Closed John-R-Wallace-NOAA closed 4 weeks ago
I am not able to reproduce it. From a Docker image:
> head(rnaturalearth::ne_countries(scale = "medium", returnclass = "sf"))[, 1:2]
Simple feature collection with 6 features and 2 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -70.06611 ymin: -18.01973 xmax: 74.89131 ymax: 60.40581
CRS: +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
scalerank featurecla geometry
0 3 Admin-0 country MULTIPOLYGON (((-69.89912 1...
1 1 Admin-0 country MULTIPOLYGON (((74.89131 37...
2 1 Admin-0 country MULTIPOLYGON (((14.19082 -5...
3 1 Admin-0 country MULTIPOLYGON (((-63.00122 1...
4 1 Admin-0 country MULTIPOLYGON (((20.06396 42...
5 3 Admin-0 country MULTIPOLYGON (((20.61133 60...
> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.10 rnaturalearth_0.1.0 magrittr_2.0.3
[4] units_0.8-1 tidyselect_1.2.0 lattice_0.20-45
[7] R6_2.5.1 rlang_1.0.6 rnaturalearthdata_0.1.0
[10] fansi_1.0.4 dplyr_1.0.10 tools_4.2.2
[13] grid_4.2.2 KernSmooth_2.23-20 utf8_1.2.2
[16] cli_3.6.0 e1071_1.7-12 DBI_1.1.3
[19] class_7.3-20 tibble_3.1.8 lifecycle_1.0.3
[22] sf_1.0-9 vctrs_0.5.1 glue_1.6.2
[25] sp_1.6-0 proxy_0.4-27 compiler_4.2.2
[28] pillar_1.8.1 generics_0.1.3 classInt_0.4-8
[31] pkgconfig_2.0.3
@John-R-Wallace-NOAA Do you still have an issue?
After checking for updates, I still get the same issue under R 4.0.1 under CentOS (with gdal-2.4.1) on our Linux server. I also tried it under R 4.1.X, but the R package S2 (needed by the sf package) has an issue installing, perhaps needing some updated Linux libraries. I will ask IT to install R 4.2.X and go from there.
I just now got it to work running R 4.2.2 under Ubuntu 20.04.5 (with GDAL 3.3.2) on Windows Subsystem for Linux (WSL).
Perfect, please let us know how it is going!
ne_countries() function in rnaturalearth version 0.2.0 under R version 4.0.1 on a Linux server:
Operating System: CentOS Linux 7 (Core) Architecture: x86-64
crashes:
Using returnclass = "sp" works but is not what is needed.
Downloading directly from this repo (using the remotes package) did not help.