[R] overlay points on plot

DJNordlund@aol.com DJNordlund at aol.com
Wed Feb 18 20:12:08 CET 2004


In a message dated 2/18/2004 10:13:53 AM Pacific Standard Time, 
femke at geog.umd.edu writes:

>Dear R-help list,
>
>I'm trying to overlay a number of data objects in a plot.  Following an 
earlier example on the >list I've created an empty plot as follows
>
>> xlim <- range(as.numeric(c("0","10000")))
>> ylim <- range(as.numeric(c("0","25")) )
>> plot(NA, xlim=xlim, ylim=ylim, xlab="distance", ylab="semivariance")
>
>However when I try to plot something on it, I get the following error:
>
>> points(v[2],v[3])
>Error in as.double.default(x) : (list) object cannot be coerced to double

Try 

points(v[, 2], v[, 3]) ?

Dan Nordlund




More information about the R-help mailing list