oswaldosantos / ggsn

R package to add north symbols and scale bars to maps created with ggplot or ggmap
http://oswaldosantos.github.io/ggsn/
GNU General Public License v2.0
161 stars 9 forks source link

Error in library(ggsn) : there is no package called ‘ggsn’ #57

Open newusersayshi opened 1 year ago

newusersayshi commented 1 year ago

Can't load this package

my code:

%load_ext rpy2.ipython

%%R
install.packages(c("ggplot2", "devtools", "dplyr", "stringr"))
install.packages(c("maps", "mapdata", "ggmap", "sf", "gssn")) 

%%R
library(ggplot2)
library(ggmap)
library(maps)
library(mapdata)
library(gssn) 

RInterpreterError: Failed to parse and evaluate line 'library(ggsn)\n'. R error message: 'Error in library(ggsn) : there is no package called ‘ggsn’'

This happens on colab, and R studio (version 4.0.2 (2020-06-22)). I've allso tried the devtools install and still get the same error.

oswaldosantos commented 1 year ago

All the ggsn imports/dependencies (ggplot, grid, sf, png, maptools, ggmap, graphics, utils) are installed? All CRAN checks are ok and I could installed it right now in RStudio (R 4.2.1) without errors or warnings.

CharlottePhilps commented 5 months ago

Hi,

I had a similar issue and then triggered the warning message when installing with "dependencies = T": Warning in install.packages : package ‘ggsn’ is not available for this version of R. I am using R version 4.3.0 (2023-04-21 ucrt)

Is there a way to get past this or should I just use an old version of R? Thank you in advance.

Best, Charlotte