[R] Split
Jeff Newmiller
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Mon Dec 23 16:30:29 CET 2019
Not clear what you mean by
summary (var1, var2)
? That is not a legal way to call summary. Perhaps
mt <- mtcars[,c("cyl","hp")]
mt$cyl <- factor( mt$cyl )
mtl <- split(mt[,"hp",drop=FALSE], mt$cyl)
lapply(mtl,summary)
On December 23, 2019 6:56:35 AM PST, Medic <mailiPadpost using gmail.com> wrote:
>I have
>mydata$var
>
>and I have
>mydata$group #two group
>
>I would like to split
>mydata$var
>by
>mydata$group #to get var1 and var2
>
>And then get
>summary (var1, var2) #this is my finite aim
>
>How to encode it all?
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
--
Sent from my phone. Please excuse my brevity.
More information about the R-help
mailing list