[R] problem with the image command
kridox at ymail.com
Wed Apr 10 03:16:28 CEST 2013
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 mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help