Hello,
I have a data frame which looks like
> head(d)
a1 a2 n j col
1 1 1 88341002 11 #E7E7E7
2 1 2 25094882 11 #E7E7E7
3 1 3 16916246 11 #E7E7E7
4 1 4 14289229 11 #E7E7E7
5 1 5 11945929 11 #E7E7E7
6 1 6 8401235 11 #E7E7E7
The values in 'j' run from 1 to 11. I would like to plot the point (a1,a2)
with color given by j
I tried
mi <- image(d[,"a1"],d[,"a2"],d[,"j"],col=mycols(length(f)),useRaster=TRUE)
(where mycols is from colorRampPalette(c("#000000","#FFFFFF"),bias=1.5)
However, i got the following error:
Error in image.default(d[, "a1"], d[, "a2"], d[, "j"], col =
mycols(length(f)), :
increasing 'x' and 'y' values expected
What am i doing wrong here? I have a million points and so would like to
write to a png or jpeg file.
Thanks much
H
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.