Hi

I have been looking around for a couple of days without being able to find
a solution.
I am trying to plot the following table using the package ggplot2

                 Month        Mean           SEM
cry3m             3    -0.05227273   0.1607422
cry6m             6     0.65826087   0.6638734
cry1y            12     0.38333333   0.3062907
cry2y            24     1.04811111   0.4921863
cry3y            36     0.88777778   0.5122407
cry5y            60    -1.22235294   1.1307222
cry7y            84     1.43454545   1.2690701
cry10y          120     0.500000    1.5101821
cry13y          156     0.165000    7.1850000

using the following code:
graph<- ggplot(data=NULL, aes(table[,1],table[,2]))+
  geom_line(data=NULL, aes(table[,1],table[,2]), color="gray60") +
  geom_errorbar(aes(ymin=mrsa, ymax=mrsa+semrsa), width=.35,
color="gray60")+
graph

The line starts obviously at 3 month, I have tried rbind to add a first
line of zeros but since I am putting Error bars in the graph the ggplot
renders an error.
The data used for errorbars is:
 mrsa
      cry3m       cry6m       cry1y       cry2y       cry3y       cry5y
  cry7y      cry10y      cry13y
-0.05227273  0.65826087  0.38333333  1.04811111  0.88777778 -1.22235294
 1.43454545  0.50000000  0.16500000
semrsa
    cry3m     cry6m     cry1y     cry2y     cry3y     cry5y     cry7y
 cry10y    cry13y
0.1607422 0.6638734 0.3062907 0.4921863 0.5122407 1.1307222 1.2690701
1.5101821 7.1850000

 Any help or reading suggestion in solving this problem would be
appreciated

-- 
Thanks in advance
Maziar Mohaddes
MD,
Gothenburg, Sweden

        [[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.

Reply via email to