我试图从https://www.tylermw.com/3d-ggplots-with-rayshader/重现以下光线着色器示例:
library(rayshader)
library(ggplot2)
library(tidyverse)
library(sf)
library(viridis)
nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
gg_nc = ggplot(nc) +
geom_sf(aes(fill = AREA)) +
scale_fill_viridis("Area") +
ggtitle("Area of counties in North Carolina") +
theme_classic()
plot_gg(gg_nc, multicore = TRUE, width = 6 ,height=2.7, fov = 70)
但运行 plot_gg 行我收到以下错误消息:
if (whichtype %in% c("text", "line")) { 中的错误:参数长度为零
知道那里发生了什么吗?