[R] Newbe Q: Some plotting diffculty..
Jonathan Baron
baron at cattell.psych.upenn.edu
Tue Jan 29 12:36:23 CET 2002
>From owner-r-help at stat.math.ethz.ch Tue Jan 29 06:13:23 2002
>I've got a data-frame contining variables i columns named after the
>specified subject and with data which represents time of observation.
>
>What I would like to do is to get a plot with observation time on the
>ordinate and subject on the abscissa -- kind of a "at what time did I
>observe the subjects?" summary..
One way to do what I think you want is:
matplot(mydataframe,type="l")
The type="l" means "lines". If subjects are columns, then each
line is a plot of one subject. If subjects are rows, then
matplot(t(mydataframe),t="l")
will work. (You can abbreviate arguments.) You can also add the
lines one by one to a plot, using
lines(). Jon
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list