Hi David, your code works perfectly on my dataset, thanks for the detailed example and for your time!
Best, Simone 2013/6/26 David Carlson <dcarl...@tamu.edu> > Your data is probably not arranged correctly. See if this works for > your data: > > > # Creating a reproducible example > > set.seed(42) > > dat <- matrix(rnorm(100*15, 5, 5)+rep(1:15, each=100), 15, 100, > byrow=TRUE) > > str(dat) > num [1:15, 1:100] 12.85 13 -2 8.98 16.67 ... > > require(gplots) > > # Rearranging dat as a data.frame with a time variable (1 to 15) > and the experimental value (val) > > # See the result of str(dat2) below for the structure > > dat2 <- data.frame(time=rep(1:15, each=100), > val=as.vector(t(dat))) > > str(dat2) > 'data.frame': 1500 obs. of 2 variables: > $ time: int 1 1 1 1 1 1 1 1 1 1 ... > $ val : num 12.85 3.18 7.82 9.16 8.02 ... > > plotmeans(val~time, dat2, n.label=FALSE) > > ------------------------------------- > David L Carlson > Associate Professor of Anthropology > Texas A&M University > College Station, TX 77840-4352 > > -----Original Message----- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Simone > Gabbriellini > Sent: Wednesday, June 26, 2013 10:20 AM > To: r-help@r-project.org > Subject: [R] help with plotmeans (gplots) > > Dear List, > > I have replicated an experiment 100 times. Each experiment lasts for > 15 > iteration. Thus I have collected results into a data.frame with 100 > columns > (one column for each experiment) and 15 rows (one row for each > iteration). > > I would like to plot mean values at each iteration using plotmeans, > but I > am unable to understand the syntax I should use. I tried: > > times<-as.factor(seq(1,15)) > > plotmeans(data~times) > > > with no luck... what should I tell to plotmeans in order to evaluate > my > dataset? > > > Best regards, > > Simone > > -- > Simone Gabbriellini, PhD > > PostDoc@DISI, University of Bologna > mobile: +39 340 39 75 626 > email: simone.gabbriell...@unibo.it > academia.edu: http://goo.gl/7pq62 > > DigitalBrains srl > Amministratore > mobile: +39 340 39 75 626 > email: simone.gabbriell...@digitalbrains.it > home: www.digitalbrains.it > > [[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 commented, minimal, self-contained, reproducible code. > > -- Simone Gabbriellini, PhD PostDoc@DISI, University of Bologna mobile: +39 340 39 75 626 email: simone.gabbriell...@unibo.it academia.edu: http://goo.gl/7pq62 DigitalBrains srl Amministratore mobile: +39 340 39 75 626 email: simone.gabbriell...@digitalbrains.it home: www.digitalbrains.it [[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 commented, minimal, self-contained, reproducible code.