[R] boxplots of various levels
jrkrideau at inbox.com
Wed Oct 31 13:12:25 CET 2012
I am not sure I understand exactly what you want but does this do anything like what you want?
mydata <- data.frame(result = rnorm(100), group = rep(c("1", "2"), each = 50),
side = sample(c("L", "R"), 100, replace = TRUE) , dtime = rep(1:10, each=10))
p <- ggplot(mydata , aes( group, result, fill = side ))+ geom_boxplot() +
Kingston ON Canada
> -----Original Message-----
> From: dysonsphere23 at gmail.com
> Sent: Tue, 30 Oct 2012 11:21:49 -0700 (PDT)
> To: r-help at r-project.org
> Subject: [R] boxplots of various levels
> noob here
> trying to make boxplots of some data
> i would like to separate the boxplots according to conditons of various
> for example:
> i have
> group:1 and 2, each group performed tests consisting of
> condition A,B,C,D
> side: left and right
> time: 1 to 10
> I would like separate boxplots of the results (x) of the tests (numeric)
> each group under each condition on each side over time.
> so far i have set it up like this:
> this gives me the plot for all vaues of x in each time bin. basicaly i
> would need a command that tells R to include only the data that agrees
> the group, condition, and side I set.
> something like
> boxplot(test$x~test$time) where
> can this be done?
> View this message in context:
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
Send any screenshot to your friends in seconds...
Works in all emails, instant messengers, blogs, forums and social networks.
TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if2 for FREE
More information about the R-help