0

I'm trying to make a Joy Division style elevation map using QGIS and R. However when I try to load libraries gplot2, ggridges, and maproj, I get an error with ggridges:

library(ggplot2)
library(ggridges)
**Error: package or namespace load failed for ‘ggridges’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):**
**there is no package called ‘Rcpp’**
library(mapproj)
Loading required package: maps

How can I fix this? The whole code I am working with can be found below:

https://pastebin.com/E2esXTad

load requisite packages
library(ggplot2)
library(ggridges)
library(mapproj)

# set your working directory
setwd("/Users/hleatherwood/Documents/Joy Divison Maps/Test/project")

# Import the Crater Lake transect data
CraterLake_80trwwansects <- read.csv(file="CraterLake_80transects.csv",
                                   header=TRUE, sep=",")

# view data frame and change column headers
head(CraterLake_80transects)
names(CraterLake_80transects)[1] <- "Elev"
names(CraterLake_80transects)[2] <- "Lon"
names(CraterLake_80transects)[3] <- "Lat"

# plot the transects with ggplot2 & ggridges
CraterLake_basic <- ggplot(CraterLake_80transects, 
                           aes(x = Lon, y = Lat, group = Lat, height = Elev)) + 
  geom_density_ridges(stat = "identity")

# Call the default plot variable
CraterLake_basic
dark-walrus
  • 101
  • 1
  • 6

0 Answers0