-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Description
I ran into a problem with using mapview and specifying a variable for the col argument. For example:
library(mapview)
franconia$n <- rnorm(nrow(franconia))
mapview(franconia, zcol = "n")
Error in if (all.equal(lim[1], lim[2])) lim = lim * c(0.999, 1.001) :
argument is not interpretable as logical
I think the issue stems from the use of all.equal to test the range limits in the extendLimits function. This can't be used directly with if. I think this would work instead:
if (isTRUE(all.equal(lim[1], lim[2]))) lim = lim * c(0.999, 1.001)
For example
lim <- c(2, 2)
if (isTRUE(all.equal(lim[1], lim[2]))) lim = lim * c(0.999, 1.001)
print(lim)
[1] 1.998 2.002
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels