[R] Creating a simple line graph

PDXRugger J_R_36 at hotmail.com
Tue Aug 25 00:00:38 CEST 2009


Hey everyone, 
   Sorry for yet another simple question but hopefully it makes whoever
comes up with the answer feel good about helping others.  I would like to
simply plot the following two sets of data in a line graph.  The one set is
an observed set of points and the latter is the predicted.  I have looked
through the documentation (which makes any graphing very complicated to me)
but i havent found what i need. So for:


Sz= c("h1","h2","h3","h4")
Pred=c(34790.0 ,47559.8, 21197.8, 28198.6)
Obs=c(34740 ,48615 ,20420, 26840)

MeanEst2000.Sz=cbind(Sz,Pred)
LaneCo2000HH.Sz =cbind(Sz,Obs)


 I would like the x-axis to display the labels(Sz) and the y-axis to be the
vlaues

I am currently using the below (wont work with sample data) which gives me
the proportions of the observed versus the predicted in four different
graphs in histogram format.

 panelHist(DataMatrix=t(apply(Hh2000.SnSz, 1, 4)),
               ObsMeans=proportion(rowSums(LaneCo2000HH.SzWk),4),
               Bounds=c(0.95, 1.05)
               )



Also, if there is additional documentation for these operations i would
appreciate any insights./  Thanks

-- 
View this message in context: http://www.nabble.com/Creating-a-simple-line-graph-tp25123681p25123681.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list