[R] Please help......barplot2

David Winsemius dwinsemius at comcast.net
Thu Dec 2 16:57:29 CET 2010


On Dec 2, 2010, at 10:36 AM, David Lyon wrote:

> Hi everyone
>
> I spent hours trying to figure this out but as a newbie I am stuck...
> can someone show me the R code for the following:
>
> If I had a tab delimited file called "file",

  Are you sure that you are not on an OS that hides the file  
extensions by default?


> containing 3 rows :
> 9.56	8.67	9.28	8.81	7.93	9.85	8.92	10.19	8.63	
> 6.36	7.29	6.68	7.11	8.04	6.05	7.04	5.80	7.34	
> 3.22	3.22	3.28	4.37	5.21	3.10	3.37	2.56	5.43	
>
> How do I import the file, then plot the mean and standard error bars  
> of the data from each row?

If the files name is really "file" then:

read.table(file="file", header=FALSE, sep="\t")

At this point I will note that this appears to be structured along the  
lines I might except for a homework problem. I will offer the advice  
that the plotCI function in package plotrix looks suitable and that we  
have an extensive collection of documentation suitable for beginners  
that probably has similar problems worked out:


>
>
> Thank you so much
>
> ______________________________________________
> 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.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list