【发布时间】:2019-11-14 07:59:25
【问题描述】:
运行此脚本并收到错误:找不到函数“plot_gg”
再次尝试卸载和安装ggplot2
运行 3.6.0
library(rayshader)
library(ggplot2)
library(tidyr)
gg = ggplot(diamonds, aes(x, depth)) +
stat_density_2d(aes(fill = stat(nlevel)),
geom = "polygon",
n = 100,bins = 10,contour = TRUE) +
facet_wrap(clarity~.) +
scale_fill_viridis_c(option = "A")
plot_gg(gg,multicore=TRUE,width=5,height=5,scale=250)
期待 3D 图形,但看不到它。 获取找不到函数“plot_gg”
【问题讨论】:
-
rayshader仍在大力开发中(最近对plot_gg的提交是 6 天前),请确保您拥有它的最新版本devtools::install_github("tylermorganwall/rayshader") -
照你说的做了,得到了这个?!下载 GitHub 存储库 tylermorganwall/rayshader@master 尝试 URL 'cran.rstudio.com/bin/windows/Rtools/Rtools35.exe' 内容类型 'application/x-msdownload' 长度 108622512 字节 (103.6 MB) 已下载 103.6 MB 错误:无法从 GitHub 安装 'rayshader':找不到必要的工具编译包另外:警告消息:1:在 untar2(tarfile, files, list, exdir) 中:跳过 pax 全局扩展标头 2:在 untar2(tarfile, files, list, exdir) 中:跳过 pax 全局扩展标头跨度>
-
看来rayshader有组件需要编译。我相信你会想先安装 Rtools。这是一个可能有帮助的链接。 jtleek.com/modules/01_DataScientistToolbox/02_10_rtools