it easier? Thanks :)
Best,
Reeyarn Lee
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
Thanks Rui, Greg, and Michael.
Your answers helped a lot!
Best,
Reeyarn
On Sun, Mar 25, 2012 at 1:02 AM, Rui Barradas wrote:
> Hello,
>
>
> You can use sql with package 'sqldf'.
> library(sqldf) # It needs package 'tcltk'
> ?sqldf
> tbl <- data.f
t[1], ]
for (type1 in type_list[ 2: length (type_list) ] ) {
mysubset<-cbind (mysubset, df [ df$type == type1, ])
}
What is the natural way of doing this in R? Is it possible to use
subset() to attain this?
Thanks!
Best,
Reeyarn
On Fri, Dec 3, 2010 at 11:26 AM, William Dunlap <
Thank you so much, Peter and Andrija :)
On Thu, Mar 29, 2012 at 1:44 PM, peter dalgaard wrote:
> %in% is your friend
> mysub <- subset(df, type %in% type_list, select=c(name,type))
> or
> mysub <- df[df$type %in% type_list, c("name","type")]
> The latter is slightly safer if you can't be sure tha
4 matches
Mail list logo