1

Is anybody able to tell me why the package "ggpattern" is not available for R version 4.0.2?

I'm using "geom_sf" to create a map and I want to add patterns instead of a simple color.

Is there an other way to do this other than using this package?

This is my code:

P <- ggplot(data = shpZone, aes(geometry = geometry)) + geom_sf (data = shpZone, fill = "blue") + geom_sf_text(aes(label = ID), size = 3)
P

Thank you!

Tom Cerul
  • 1,773
  • 2
  • 13
  • 27
Sora
  • 13
  • 4
  • 2
    I'm assuming this is an installation issue. It's not available on CRAN, you can install it from github using `remotes::install_github("coolbutuseless/ggpattern")`. – teunbrand Nov 17 '21 at 15:18
  • 1
    Thank you for your answer. I tried to intall it from Github using your code, but I had warnings. Is this related to my R version? – Sora Nov 17 '21 at 16:33
  • The code in `{ggpattern}` itself should work with R 4.0 (although newer versions of the package can *optionally* take advantage of features introduced by R 4.1). Not impossible though that the latest version of one of the packages it depends on might depend on a later version of R. – Trevor Jan 24 '22 at 22:31
  • @Trevor will there be a version `{ggpattern}` compatible with R4.02? – user4786271 Mar 07 '22 at 18:37
  • `{ggpattern}` is probably already compatible with R4.02. Looking at its [CRAN page](https://cran.r-project.org/web/packages/ggpattern/) it is definitely compatible with R4.05 and I can't think of a reason it wouldn't also be compatible with R4.02. On sufficiently old versions of R you may need to **manually** install older ("archived") versions of some of its dependencies before installing `{ggpattern}` with `install.packages()`... – Trevor Mar 08 '22 at 20:51

0 Answers0