[R] problem with the image command
kridox at ymail.com
Wed Apr 10 03:47:49 CEST 2013
In the case:
"long" is not in (strictly) ascending order, according to the sample you
On 04/10/2013 10:28 AM, cassie jones wrote:
> Yes, I did. But I get the following error with the command
> "Error in image.default(x=long,y=lat,z=values):
> error in evaluating the argument 'x' in selecting a method for
> function 'image': Error in long: recursive indexing failed at level 2"
> On Tue, Apr 9, 2013 at 8:16 PM, Pascal Oettli <kridox at ymail.com
> <mailto:kridox at ymail.com>> wrote:
> Did you carefully read the help for "image" ?
> ## Default S3 method:
> image(x, y, z, zlim, xlim, ylim, col = heat.colors(12),
> add = FALSE, xaxs = "i", yaxs = "i", xlab, ylab,
> breaks, oldstyle = FALSE, useRaster, ...)
> On 04/10/2013 10:07 AM, cassie jones wrote:
> Hello R-users,
> I am trying to do an image plot where I have been given latitudes,
> longitudes and the values at the corresponding locations. A
> sample of the
> data is given as follows:
> I used the following command to generate the image plot along
> with an U.S.
> But every time I run the code I get the following error:
> Error in image.default(values,x=sort(__long),y=sort(lat),
> increasing 'x' and 'y' values expected
> Even though I sort the latitude and longitude in increasing
> order, I am
> getting this error. Any help is greatly appreciated.
> Thanks in advance,
> [[alternative HTML version deleted]]
> R-help at r-project.org <mailto:R-help at r-project.org> mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help