Dear R users, I am trying to draw error bars in a bar plot, I use this code (tried many others which did not work): install.packages() library(gplots) y <-c(39.02, 46.42) se <- c(7.57,7.35) plot <- barplot(y, beside=TRUE, col=0, ylim=c(0,47), axis.lty=1, main="far-red", xlab="latitude", names.arg=c("56N", "68N")) superpose.eb(plot, y, se, col="orange", lwd=2) Then I get an error saying that it cannot find the superpose.eb function. Why? Isn?t under gplots? Thanks Rosario
I don't have any idea where you came up with superpose.ep - rseek.org doesn't return any results for a function of that name. If you check the package information for gplots you'll see that plotCI() is available to plot error bars. There's also the errbar() function from hmisc, and probably several others. Sarah On Thu, Jun 3, 2010 at 11:33 AM, Rosario Garcia Gil <M.Rosario.Garcia at genfys.slu.se> wrote:> Dear R users, > > I am trying to draw error bars in a bar plot, I use this code (tried many others which did not work): > > install.packages() > library(gplots) > y <-c(39.02, 46.42) > se <- c(7.57,7.35) > plot <- barplot(y, beside=TRUE, col=0, ylim=c(0,47), axis.lty=1, main="far-red", xlab="latitude", names.arg=c("56N", "68N")) > superpose.eb(plot, y, se, col="orange", lwd=2) > > Then I get an error saying that it cannot find the superpose.eb function. > > Why? Isn?t under gplots? >-- Sarah Goslee http://www.functionaldiversity.org
Hi Rosario, It saying that because you could have not loaded that function in your R session. It availbale at [1]. Go there, copy and paste it in your session. You should be ready to go after doing this. HTH, Jorge [1] http://egret.psychol.cam.ac.uk/statistics/R/graphs1.html On Thu, Jun 3, 2010 at 11:33 AM, Rosario Garcia Gil <> wrote:> Dear R users, > > I am trying to draw error bars in a bar plot, I use this code (tried many > others which did not work): > > install.packages() > library(gplots) > y <-c(39.02, 46.42) > se <- c(7.57,7.35) > plot <- barplot(y, beside=TRUE, col=0, ylim=c(0,47), axis.lty=1, > main="far-red", xlab="latitude", names.arg=c("56N", "68N")) > superpose.eb(plot, y, se, col="orange", lwd=2) > > Then I get an error saying that it cannot find the superpose.eb function. > > Why? IsnĀ“t under gplots? > > Thanks > Rosario > > ______________________________________________ > 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. >[[alternative HTML version deleted]]
It looks like superpose.eb is someone's function and not in a package. https://stat.ethz.ch/pipermail/r-help/2002-November/027299.html --- On Thu, 6/3/10, Rosario Garcia Gil <M.Rosario.Garcia at genfys.slu.se> wrote:> From: Rosario Garcia Gil <M.Rosario.Garcia at genfys.slu.se> > Subject: [R] (no subject) > To: "r-help at r-project.org" <r-help at r-project.org> > Received: Thursday, June 3, 2010, 11:33 AM > Dear R users, > > I am trying to draw error bars in a bar plot, I use this > code (tried many others which did not work): > > install.packages() > library(gplots) > y <-c(39.02, 46.42) > se <- c(7.57,7.35) > plot <- barplot(y, beside=TRUE, col=0, ylim=c(0,47), > axis.lty=1, main="far-red", xlab="latitude", > names.arg=c("56N", "68N")) > superpose.eb(plot, y, se, col="orange", lwd=2) > > Then I get an error saying that it cannot find the > superpose.eb function. > > Why? Isn?t under gplots? > > Thanks > Rosario > > ______________________________________________ > R-help at 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. >