Rayshader 错误:“{ 中的错误:任务 1 失败 - “未找到对象 '_rayshader_rayshade_multicore'””

问题描述 投票:0回答:1

尝试在运行 Sonoma 14.5 的 Mac 上运行该示例。我正在运行 R v4.4.0。所有软件包均已安装,没有错误。

library(rayshader)
library(ggplot2)
library(tidyverse)
library(sf)
library(viridis)

nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
theme_set(theme_classic())

gg_nc = ggplot(nc) +
  geom_sf(aes(fill = AREA)) +
  scale_fill_viridis("Area") +
  ggtitle("Area of counties in North Carolina")

plot_gg(gg_nc, multicore = TRUE, width = 6 ,height=2.7, fov = 70)

最后一个命令返回:

Error in { : 
  task 1 failed - "object '_rayshader_rayshade_multicore' not found"
r rayshader
1个回答
0
投票

感谢两位提供意见的人。我找到了答案:我没有安装 XQuartz。从 XQuartz 主页:

brew install --cask xquartz

重新启动计算机和 RStudio,它也为我运行。

© www.soinside.com 2019 - 2024. All rights reserved.