Computation failed in `stat_smooth()`: object 'C_crspl' not found

时光毁灭记忆、已成空白 提交于 2019-12-05 10:25:23

I had similar issues:

# `geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
# Warning message:
# Computation failed in `stat_smooth()`:
# object 'C_crspl' not found 

and

# Warning message:
# Computation failed in `stat_smooth()`:
# object 'C_magic' not found  

when using geom_smooth(method="gam"). The problems vanished when I explicitly loaded the mgcv package version 1.8-17. I guess by default, ggplot (I use 2.2.1.9000) looked at 1.8-16, which was also in the search path. So you might want to update mgcv or make sure that the latest version is used.

I could not reproduce your problem: it works fine in my system. I guess you have a problem with some ggplot2 dependency. Try restarting your session and reinstall ggplot2.

If that doesn't work, test geom_smooth() with a different dataset and a different method, e.g. qplot(Sepal.Length, Sepal.Width, data = iris) + geom_smooth(method = 'lm')

I had the same exact issue. Tried loading mgcv explicitly and this did nothing. Since I originally relied on ggplot2 to install mgcv, I went back and installed mgcv myself so that the newest version was included and then re-installed ggplot2 and the issue went away. This is on Ubuntu 16.04 with ggplot2 2_2.2.1 and mgcv 1.8-23.

I also had this problem and almost gave up. However, when I simply reinstalled mgcv before and ggplot2 later, the script simply went back to working as before.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!