根據下面的代碼,我該如何解決這個錯誤:
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘terra’ 1.6-7 is being loaded, but >= 1.6.16 is required
In addition: Warning message:
`stat(nlevel)` was deprecated in ggplot2 3.4.0.
? Please use `after_stat(nlevel)` instead.
代碼:
library(rayshader) # latest version 0.24.10
# 3D plotting with rayshader and ggplot2
ggdiamonds = ggplot(diamonds)
stat_density_2d(aes(x = x, y = depth, fill = stat(nlevel)),
geom = "polygon", n = 200, bins = 50,contour = TRUE) facet_wrap(clarity~.)
scale_fill_viridis_c(option = "A")
par(mfrow = c(1, 2))
plot_gg(ggdiamonds, width = 5, height = 5, raytrace = FALSE, preview = TRUE)
uj5u.com熱心網友回復:
看起來您的 terra 版本需要更新:
install.packages("terra")
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/536935.html
標籤:r图表2大地光线着色器
