Oli.Martin
Oli.Martin

Reputation: 3

Function click of package Raster : Error: not compatible with requested type

I have this error:

Error: not compatible with requested type_

In the R console when I use the function click of the package raster.
More precisely, I can click on the raster and the result (values of the raster) are returned in the console but when I stop the selection using the stop button at the up left of the graphic window this error occur. Even when I used the example of this function : ?click.
I need to record the output of the function click in an object but it is not possible because of this error.

I saw in another post that the problem seems to come from the package Rcpp but I do not understand how to solve the problem.

I would appreciate any help to solve this problem!

PS : A friend of I have not this error this error while he used exactly the same code with exactly the same R version and RStudio version.

Upvotes: 0

Views: 799

Answers (2)

Escobar
Escobar

Reputation: 13

I had the same problem, (I was trying to extract bioclimatic variables from records with decimal degrees coordinates), and its as that decimal numbers were separated by comas, not full periods. After I replace the comas by full periods,it worked.

Upvotes: 0

Robert Hijmans
Robert Hijmans

Reputation: 47146

I have fixed this in raster version 2.4-21. You may be able to install this from R-Forge (install.packages("raster", repos="http://R-Forge.R-project.org")).

Upvotes: 1

Related Questions