Re: [R] how use the subset?

2009-07-31 Thread jim holtman
'scan' creates a 'list'; subset is typically used on dataframes. I can get a similar message below: > x <- list(a=1:10, b=1:10) > subset(x, a<5) Error in subset.default(x, a < 5) : object 'a' not found > # now convert the list to a dataframe > x.df <- as.data.frame(x) > subset(x.df, a < 5) a b

Re: [R] how use the subset?

2009-07-30 Thread Steve Lianoglou
Hi, On Jul 31, 2009, at 12:02 AM, Jie TANG wrote: hi ,everyone I want subtract some dataset by subset. From the help running help(subset), ths information is "*subset(airquality, Day == 1, select = -Temp)* " while I running my script written as "*g1data<-subset(errdata, fac>12) *"

[R] how use the subset?

2009-07-30 Thread Jie TANG
hi ,everyone I want subtract some dataset by subset. >From the help running help(subset), ths information is "*subset(airquality, Day == 1, select = -Temp)* " while I running my script written as "*g1data<-subset(errdata, fac>12) *" ,it is wrong with the error information "*subset.default(