[R] plot matrix
Marek Bartkuhn
Marek.Bartkuhn at gen.bio.uni-giessen.de
Thu Feb 14 18:02:06 CET 2008
Dear R users,
I like to plot a matrix A which looks like this:
,1 ,2 ,3 ,4
1, 1 10 100 1000
2, 0.5 0.2 1.0 4.3
3, 0.1 0.2 0.3 0.5
.....
where the 1st row is representing the X-axis values. The subsequent
rows should be plotted on the y-axis. I would prefer to use the
smoothScatter plotting function of the geneplotter package, but to
begin with R I'd be happy to use any scatterplot with the given
dataset provided in the matrix A.
So I tried:
plot(A[1,],A[2:3,])
or
plot(A[1,],A[2-3,])
both result in :
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ
What do I have to do?
Marek
More information about the R-help
mailing list