Reputation: 59
I'm applying the function image(cp) to gps data but when I do so it throws up the following error
Error in image(as(x, "SpatialGridDataFrame"), ...) :
error in evaluating the argument 'x' in selecting a method for function 'image': Error: cannot allocate vector of size 12.3 Mb
The SpatialPointsDataFrame of my relocation gps data has two columns. One with the coordinates, the other with the ID of the animal.
I'm running it on a 32 bit system with 4 gigs of RAM.
How do I get around this?
Upvotes: 0
Views: 143
Reputation: 29477
One way that might work with no thinking required:
library(raster)
r <- raster(cp)
image(r)
But, you say cp
is "gps data" so it's not at all clear why this would be imageable.
One thing you can do is plot it:
plot(cp)
That will work for a SpatialPointsDataFrame
. If you want to create an image from this somehow you'll need to specify some details.
Upvotes: 1