[R] Odp: Plot a matrix
petr.pikal at precheza.cz
Tue Nov 30 11:33:51 CET 2010
r-help-bounces at r-project.org napsal dne 30.11.2010 10:52:35:
> I have this MATRIX m:
> index sensor1.A sensor1.B sensor2.A sensor2.B sensor3.A
> 2010-10-1 7:32:00 8 NA 5 NA 2
> 2010-10-3 4:33:21 NA 3 NA 2 1
> 2010-10-5 7:32:00 NA 4 NA 6 7
> m[,0] represents "date"
what is this, zero indexing is probably possible but not implemented in
> m[,1] represent an "array" of values
Do you really mean array? What are its dimensions?
> also m[,2],m[,3],m[,4],m[,5] represent "arrays" of values
> how can I plot this matrix? I would like to have:
I am tempted to say to use ?matplot but without knowing what object you
really have it is rather wild guess. Besides with NA in your data you do
not get continuous line. See ?lines Details section.
> at x axes: "index" (the list of dates)
> and 5 lines (one for each columns sensor1.A sensor1.B sensor2.A
> View this message in context:
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help