search for: errbar

Displaying 20 results from an estimated 43 matches for "errbar".

2010 Jun 05
2
how to use 'points' function to plot two curves with errbar
Dear R Users, I am using R on windows. how to use 'points' function to plot two curves with errbar I am doing like: x.val <- as.integer(names(co2mean)) errbar(x.val, co2mean, co2mean + co2sd, co2mean - co2sd, xaxt='n', col=1, xlab=NA,ylab=NA)# obs error bar lines(x.val, co2mean, col=1, lwd=2) errbar(x.val, co2tm3.month.mean, co2tm3.month.mean + co2sd.tm3, co2tm3.month.mean - co2sd....
2013 Jan 10
2
Titles - main and subtitle won't plot with errbar
Hi, I'm struggling with errbar graphics. I'm trying to plot an x-y graph with correct labelling, however can't seem to get main and sub to show on my graph. They do work when I use title(main="," etc...., but this will make it look at lot messier,I'll have to blank out ylab=" " , and I need to...
2004 Feb 08
2
parsing numbers from a string
Dear R-help members, I have several large data sets from certain simulations I did and now I want to plot the results nicely. I don't know anything about the size of the x and y values in advance. Plotting these values is not a problem. However, I want to add errorbars (errbar in the Hmisc package). 1) For this I'm factoring the data (xdata00 varies from 0 to max(xdata00)) xfactor00 = factor(cut(xdata00, breaks = (max(xdata00)/10)*(0:100))) 2) I compute the means of the different levels ymeans00 = tapply(ydata00, xfactor00, mean) 3) I compute the errors of the d...
2005 Jul 29
1
Errbar()-function, cap and logarithmic scaling
Hello! If I use the errbar-function and have a logarithmic scale on the x-axis, then the little horizontal bars at the end of the errbars (cap) disappear. What can I do? Thanks for helping! Ute
2012 Oct 25
2
error bars
Hello R-help, I am using R version 2.15.1. I upgraded from R version 2.13 a few months back. Previously, I was able to plot error bars on an xy scatter plot using the errbar function: errbar(RAEthylene$TIME,RAEthylene$AVE,RAEthylene$AVE+RAEthylene$STD,RAEthylene$AVE-RAEthylene$STD,add = TRUE,lty=2,pch=17); Today, I went to update my plot. However, in R version 2.15.1 I get error code saying that this function cannot be found: Error: could not find function "...
2011 Feb 10
2
Hmisc errbar color
...to make the error bars the same color as the points and lines they are plotted with. My example # fake data x=sample(1:10, 100, replace =T) y = rnorm(100) + runif(100) df=data.frame(x,y) # summarize data m = aggregate(df,list(x),mean) se = aggregate(df,list(x),sd)/sqrt(10) library(Hmisc) plot(x,y) errbar(m$x, m$y, m$y+1.96*se$y, m$y-1.96*se$y,col='red',cex=2,type='b',add=TRUE) Thanks, Rob ------------------------------------------ Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A. T. Still University of Health Sciences Kirksville, MO 63501...
2011 Apr 29
2
abline outside of plot region
Hi R people. I ran into this problem: I created a plot with errbars, like this: > errbar(x=c(1,2,3,4), y=c(2,1,3,3), yminus=c(1.5,0.5,2.5,2.5), yplus=c(2.5,1.5,3.5,3.5)) Next, I wanted to accentuate some x value with an abline, like this: > abline(v=2) In one of my R sessions (which admittedly I have had open for quite a while now), the abline draws o...
2010 Apr 19
2
plotting RR, 95% CI as table and figure in same plot
...'m looking at a recent JAMA article in which both numbers and dotplot of RR and 95% CI are presented and wondering about best way to do this in R. Essentially, the plot has 3 columns: variable names, RR and 95% CI, and dotplot of the same. Using the bioChemists data in the pscl package and errbar function in Hmisc package, the code below is in the right direction... but still pretty ugly. Wondering if folks would have alternative suggestions about how to go about this, or pointers on cleaning up the code below (eg, I know there are many functions for plotting errbars/CI). [And, obviou...
2012 May 01
1
error bars for a barchart
...,groups=Process,change, auto.key=list(points=FALSE,rectangles=TRUE), panel=function(x, y,...){ panel.barchart(x,y,origin = 0,...); panel.abline(h=0,col="black",...); } ) I have tried using the panel.errbars from the memisc package which works great for xyplots, but when I add it to my code it does not respect the groups. library(memisc) barchart(cbind(Change,lower,upper)~fTreat,groups=Process,change, ylab="Pocertage change", ylim=-115:50, scales=list(alte...
2008 Oct 26
1
Using the legend function inside a bar chart error.bars function
...E bartable<-barplot(mean.table, beside=TRUE, ylim=c(0,biggest.value+1), col=c("lightblue", "mistyrose"))   bartable<-barplot(mean.table, beside=TRUE, ylim=c(0,biggest.value+1), col=c("lightblue", "mistyrose"), legend=rownames(mean.table)) # Error bars   errbar.width<-(max(bartable)-min(bartable))/50   for(i in 1:length(mean.table[,1])){     for(j in 1:length(mean.table[1,])){       lines(c(bartable[i,j],bartable[i,j]),       c(mean.table[i,j]-std.errors[i,j],       mean.table[i,j]+std.errors[i,j]))       lines(c(bartable[i,j]-errbar.width,       bart...
2007 Dec 05
1
Plotting error bars in xy-direction
Dear R-help, I am looking for a function that will plot error bars in x- or y-direction (or both), the same as the Gnuplot function 'plot' can achieve with: plot "file.dat" with xyerrorbars,... Rsite-searching led me to the functions 'errbar' and 'plotCI' in the Hmisc, gregmisc, and plotrix packages. As I understand the descriptions and examples, none of these functions provides horizontal error bars. Looking into 'errbar' and using segments, I wrote a small function for myself adding these kinds of error bars t...
2011 Feb 09
3
add error bars in a plot
Dear all I have a dataset of how metal concentrations change through time. I have made a plot of date versus metal concentration. However I want to add error bars in the plot. Could you help me? Thanks Maria [[alternative HTML version deleted]]
2006 Mar 24
1
Multiple error bar plots
Dear R-lister I have a question about how to create multiple error bar plots. I found that I can use an "errbar" function from Hmisc package to create one error bar plot in which there are multiple data points (x, y) with the error bars. Thus, I know that I can get "one" error bar plot which consists of many data points. However, I did not find a way to put "multiple" error bar plots...
2010 Apr 21
1
Adding error bars to xyplot()
Hi, I want to add error bars to a plot generated with xyplot. I've tried both errbar() and plotCI(), but in both cases the points are not in the same place. It's as if the two functions are using a different frame of reference for the plotting area. for example: means <- c(92.5, 92.25, 90.9, 91.0, 94.15, 90.05) #means time <- c(1,1,2,2,3,3) #occasion variable group &l...
2007 Sep 28
1
errorbar il lattice plot
...sits there quite unused. I am not even clear how what data object to put the standard errors for the thing to work... My code (the version that at least draws a plot): xyplot(inbreeding~generations|breeds, data = trellisplot, type = 'l', layout = c(2,5), col = 'black', lwd = 3, errbar = function(x, y, err, down = T, width = 0.005, lwd = 1, plot = T, colour="black") { up <- y + err dn <- y - err x.range <- max(x) - min(x) wid.lf <- x - (x.range * width) wid.rt <- x + (x.range * width) if(plot == F) { return(data.frame(x, up, dn))...
2008 Mar 13
1
how to generate bar charts with the standard deviation
Hi, I have the two vectors mean and sd of individual columns, but I am unsure how to generate bar charts with the standard deviation, even after looking the help of barplot and barplot.2. [[alternative HTML version deleted]]
2009 Nov 13
1
plot arguments (PR#14063)
Hi there, I have recently updated to ver 2.10 (windows - I'm running xp) and find I am having problems with plot arguments, for e.g. Using the errbar function the error bars are now in black despite col="red", the central point is in red though. Axis labels are drawn but not the 'main' title. No errors are reported. Using the plot function directly I was only able to get type="l" to work - I didn't try them all t...
2003 Dec 20
7
error bars around a point
All Is there an R command to produce error bars around a plotted point. Crawley's book uses the command error.bar() but my version of R rejects it. Must be an S+ command(?). Thanks REX [[alternative HTML version deleted]]
2011 Jun 17
1
Errorbars
...The bars default function (it seems) is to have a dot in the middle of the bar, however i don't want it there. I am using Hmis to draw my errorbars and code is a<-as.vector(tapply(Sporangia,list(Host,Isolate),mean)) b<-as.vector(tapply(Sporangia,list(Host,Isolate),sd)) c<-sqrt(b/36) errbar(c(1.5,2.5,3.5,5.5,6.5,7.5),(tapply(Sporangia,list(Host,Isolate),mean)),a+c,a-c,add=T) Cheers Anna [[alternative HTML version deleted]]
2004 Jun 08
0
interaction plot with intervals based on TukeyHSD
...*++ ly <- cells[,1]+(HSDfactor*0.5) ++ uy <- cells[,1]-(HSDfactor*0.5)* *++ errbar(xvals,cells[,1],ly,uy,add=TRUE, lty=3, cap=0, lwd=2) ++ ly <- cells[,2]+(HSDfactor*0.5) ++ uy <- cells[,2]-(HSDfactor*0.5)...