Re: [R] how to initial a list to store data result?

2010-06-21 Thread Bill.Venables
The usual method is either lis - vector(list) or, nearly equivalently, lis - list() If you know in advance how many components the list will have, there can be a slight advantage in using lis25 - vector(list, 25) if e.g. you know the list will be of length 25. Bill Venables.

Re: [R] {Spam?} RE: {Spam?} RE: {Spam?} Re: mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-21 Thread Christos Argyropoulos
Hi Carlo, One quick way to verify that the fixed effects parts are the same, is to examine the design matrices that gamm passes on to lme. They should be the same if the interpretation is correct. If you want to follow the mixed effect relation to its end, why not specify REML as the fitting

[R] how to efficiently compute set unique?

2010-06-21 Thread G FANG
Hi, I want to get the unique set from a large numeric k by 1 vector, k is in tens of millions when I used the matlab function unique, it takes less than 10 secs but when I tried to use the unique in R with similar CPU and memory, it is not done in minutes I am wondering, am I using the

Re: [R] how to efficiently compute set unique?

2010-06-21 Thread Duncan Murdoch
On 21/06/2010 9:06 PM, G FANG wrote: Hi, I want to get the unique set from a large numeric k by 1 vector, k is in tens of millions when I used the matlab function unique, it takes less than 10 secs but when I tried to use the unique in R with similar CPU and memory, it is not done in minutes

[R] RSQLite and fetching rows from multiple tables

2010-06-21 Thread Jonathan Greenberg
I'm trying to use RSQLite statement to cycle through a large database in chunks via the fetch(...,n=2). As far as I can tell, however, it keeps re-fetching the same beginning set of rows -- any ideas what might be wrong with the following code? The select statement is pulling from multiple

Re: [R] how to efficiently compute set unique?

2010-06-21 Thread David Winsemius
On Jun 21, 2010, at 9:18 PM, Duncan Murdoch wrote: On 21/06/2010 9:06 PM, G FANG wrote: Hi, I want to get the unique set from a large numeric k by 1 vector, k is in tens of millions when I used the matlab function unique, it takes less than 10 secs but when I tried to use the unique in R

Re: [R] how to efficiently compute set unique?

2010-06-21 Thread Steve Taylor
The original question was about a matrix, not a vector and this is much slower: x - sample(10, size=13584763, replace=T) dim(x) - c(13584763, 1) system.time(unique(x)) So the solution would be: unique(as.vector(x)) From: Duncan Murdoch murdoch.dun...@gmail.com To:G FANG

Re: [R] how to efficiently compute set unique?

2010-06-21 Thread Douglas Bates
On Mon, Jun 21, 2010 at 8:38 PM, David Winsemius dwinsem...@comcast.net wrote: On Jun 21, 2010, at 9:18 PM, Duncan Murdoch wrote: On 21/06/2010 9:06 PM, G FANG wrote: Hi, I want to get the unique set from a large numeric k by 1 vector, k is in tens of millions when I used the matlab

Re: [R] rbind with different columns

2010-06-21 Thread Daniel Malter
Works wonderfully. I am very happy that I eventually found this post :) Daniel. -- View this message in context: http://r.789695.n4.nabble.com/rbind-with-different-columns-tp907370p2263588.html Sent from the R help mailing list archive at Nabble.com.

<    1   2