-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Description
To reproduce:
Rscript --vanilla -e "pdf();library(tmap);data(Europe);tm_shape(Europe)+tm_polygons(col='pop_est');dev.off()"
Error in bb(mshp_raw) : Incorrect x argument
Calls: <Anonymous> -> print.tmap -> print_tmap -> bb
In addition: Warning message:
In is.na(x) : is.na() applied to non-(list or vector) of type 'S4'
Execution halted
In reallity the bb() function fails, so the easiest reproducible way (under Linux), is this:
Rscript --vanilla -e "devtools::install_github('mtennekes/tmap',subdir='pkg');library(tmap);data(Europe);;pdf();bb(Europe);dev.off()"
or without the pdf():
Rscript --vanilla -e "library(tmap);data(Europe);bb(Europe)"
I tried the CRAN version as well, and same problem.
It works by execution R from the commandline:
R --vanilla -e "devtools::install_github('mtennekes/tmap',subdir='pkg');library(tmap);data(Europe);Europe;pdf();bb(Europe)"
I tried as well something similar with ggplot2, and it does work with RScript:
Rscript --vanilla -e "pdf();library(ggplot2);qplot(mpg, wt, data = mtcars);dev.off()"
My use case is to use the function servr::jekyll() to convert a bunch of Rdm file to html.
And this function shells out and executes knitr via Rscript and in there the rendering of tmap fails.
I was trying various versions of tmap, and tried it as well in a brand new Docker container, but always the same result.
Metadata
Metadata
Assignees
Labels
No labels