Re: [R] Error.bars
Sueli Rodrigues wrote: Hi, I'm studying the Michael J. Crawley book (Statistics An Introduction using R)and I'm trying to reproduce one example (page 168) for plot a barplot with error bars, but when I put the function I receive the following message. Please, could someone told me what's wrong? error.bars=function(yv,z,nn){xv=barplot(yv,ylim=c(0,(max(yv)+max(z))),names=nn,ylab=deparse(substitute(yv)))g=(max(xv)-min(xv))/50 for(i in 1:length(xv)){lines(c(xv[i],xv[i]),c(yv[i]+z[i],yv[i]-z[i]))lines(c(xv[i]-g,xv[i]+g),c(yv[i]+z[i],yv[i]+z[i]))lines(c(xv[i]-g,xv[i]+g),c(yv[i]-z[i],yv[i]-z[i]))}} Erro: unexpected symbol in error.bars=function(yv,z,nn){xv=barplot(yv,ylim=c(0,(max(yv)+max(z))),names=nn,ylab=deparse(substitute(yv)))g Sueli Rodrigues Eng. Agrônoma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutrição de Plantas Fones (19)93442981 (19)33719762 This is the notorious dynamite plot which causes distorted perceptions, has an arbitrary base, and other problems. See http://biostat.mc.vanderbilt.edu/DynamitePlots for more information. Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ 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.
[R] error.bars
Hi, I'm trying to use the function error.bars, but the program don't find it, and I dont't found any package with this function. Is there some another functin to draw barplots with error bars? Sueli Rodrigues Eng. Agrônoma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutrição de Plantas Fones (19)93442981 (19)33719762 __ 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.
Re: [R] error.bars
http://finzi.psych.upenn.edu/R/library/psych/html/error.bars.html On Mar 11, 2009, at 3:57 PM, Sueli Rodrigues wrote: Hi, I'm trying to use the function error.bars, but the program don't find it, and I dont't found any package with this function. Is there some another functin to draw barplots with error bars? Sueli Rodrigues Eng. Agrônoma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutrição de Plantas Fones (19)93442981 (19)33719762 __ 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. David Winsemius, MD Heritage Laboratories West Hartford, CT __ 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.
Re: [R] error.bars
Hi Sueli, Try this: http://users.fmg.uva.nl/rgrasman/rpages/2005/09/error-bars-in-plots.html and this: http://egret.psychol.cam.ac.uk/statistics/R/graphs1.html On Wed, Mar 11, 2009 at 9:57 PM, Sueli Rodrigues srodr...@esalq.usp.brwrote: Hi, I'm trying to use the function error.bars, but the program don't find it, and I dont't found any package with this function. Is there some another functin to draw barplots with error bars? Sueli Rodrigues Eng. Agrônoma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutrição de Plantas Fones (19)93442981 (19)33719762 __ 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. -- -- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: www.talgalili.com www.biostatistics.co.il [[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.
[R] Error.bars
Hi, I'm studying the Michael J. Crawley book (Statistics An Introduction using R)and I'm trying to reproduce one example (page 168) for plot a barplot with error bars, but when I put the function I receive the following message. Please, could someone told me what's wrong? error.bars=function(yv,z,nn){xv=barplot(yv,ylim=c(0,(max(yv)+max(z))),names=nn,ylab=deparse(substitute(yv)))g=(max(xv)-min(xv))/50 for(i in 1:length(xv)){lines(c(xv[i],xv[i]),c(yv[i]+z[i],yv[i]-z[i]))lines(c(xv[i]-g,xv[i]+g),c(yv[i]+z[i],yv[i]+z[i]))lines(c(xv[i]-g,xv[i]+g),c(yv[i]-z[i],yv[i]-z[i]))}} Erro: unexpected symbol in error.bars=function(yv,z,nn){xv=barplot(yv,ylim=c(0,(max(yv)+max(z))),names=nn,ylab=deparse(substitute(yv)))g Sueli Rodrigues Eng. Agrônoma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutrição de Plantas Fones (19)93442981 (19)33719762 __ 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.
Re: [R] Error.bars
It would appear there is not a carriage return in the sequence ')))g=; I assume that was the unexpected character. Better formatting would be useful. On Wed, Mar 11, 2009 at 7:49 PM, Sueli Rodrigues srodr...@esalq.usp.br wrote: Hi, I'm studying the Michael J. Crawley book (Statistics An Introduction using R)and I'm trying to reproduce one example (page 168) for plot a barplot with error bars, but when I put the function I receive the following message. Please, could someone told me what's wrong? error.bars=function(yv,z,nn){xv=barplot(yv,ylim=c(0,(max(yv)+max(z))),names=nn,ylab=deparse(substitute(yv)))g=(max(xv)-min(xv))/50 for(i in 1:length(xv)){lines(c(xv[i],xv[i]),c(yv[i]+z[i],yv[i]-z[i]))lines(c(xv[i]-g,xv[i]+g),c(yv[i]+z[i],yv[i]+z[i]))lines(c(xv[i]-g,xv[i]+g),c(yv[i]-z[i],yv[i]-z[i]))}} Erro: unexpected symbol in error.bars=function(yv,z,nn){xv=barplot(yv,ylim=c(0,(max(yv)+max(z))),names=nn,ylab=deparse(substitute(yv)))g Sueli Rodrigues Eng. Agrônoma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutrição de Plantas Fones (19)93442981 (19)33719762 __ 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. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? __ 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.