[R] values>10 in points(... pch=as.character())

Tord Snall tord.snall at ebc.uu.se
Thu Jun 26 15:59:31 CEST 2003


Dear all,

I want to plot the values of a data frame in an image using as.character()
as below. It works fine for values lower than 10. However, data values >10
are plotted as ones, i.e. 1, in the plot. 

Could someone please let men know how to plot values larger than 10.


image(vgridpred, loc = vgrid, col=gray(seq(1,0.1,l=30)), xlab="Coord X",
ylab="Coord Y")
points(valktreedat$x, valktreedat$y, col = "blue", pch =
as.character(valktreedat$pred.tg.gu))
range(valktreedat$pred.tg.gu)
[1]  4.674906 18.160361

For values larger than 10 of valktreedat$pred.tg.gu the number "1" is
plotted with the above code.

R 1.7.0, Win XP


Thanks!

Sincerely,
Tord

-----------------------------------------------------------------------
Tord Snäll
Avd. f växtekologi, Evolutionsbiologiskt centrum, Uppsala universitet
Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University
Villavägen 14			
SE-752 36 Uppsala, Sweden
Tel: 018-471 28 82 (int +46 18 471 28 82) (work)
Tel: 018-25 71 33 (int +46 18 25 71 33) (home)
Fax: 018-55 34 19 (int +46 18 55 34 19) (work)
E-mail: Tord.Snall at ebc.uu.se
Check this: http://www.vaxtbio.uu.se/resfold/snall.htm!




More information about the R-help mailing list