[R] plotting vectors of different lengths
Bert Gunter
gunter.berton at gene.com
Sat Mar 22 16:17:31 CET 2014
On Sat, Mar 22, 2014 at 7:10 AM, arun <smartpink111 at yahoo.com> wrote:
> [
No no no.
She (apparently) says she wants to plot a numeric grid given the x and
y coordinates of the grid, not create a character matrix of strings
representing the ordered pairs.
set.seed(1234)
x <- runif(6)
y <- runif(5)
dat <- expand.grid(x=x,y=y)
plot(y~x, data = dat)
However, if what she really means (??) is that she wants to plot
values in some way AT the coordinates, then she probably needs to look
at ?contour or ?image (or their lattice or ggplot equivalents).
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374(650) 467-7374(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch
Call
Send SMS
Add to Skype
You'll need Skype CreditFree via Skype
Call
Send SMS
Add to Skype
You'll need Skype CreditFree via Skype
More information about the R-help
mailing list