在R错误中使用ggplot函数:找不到函数ggplot [英] Using ggplot function in R error : could not find function ggplot

查看:2542
本文介绍了在R错误中使用ggplot函数:找不到函数ggplot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了ggplot和ggplot2及其依赖项,但是我不能使用功能ggplot;每当我尝试使用它时,我都会得到

I have installed ggplot and ggplot2 and their dependencies, but I cannot use the function ggplot; whenever I try to use it I get

ggplot中的错误...找不到函数"ggplot"

Error in ggplot ... could not find function "ggplot"

推荐答案

尝试:

library(ggplot2)

即使在安装软件包后,每次加载R时也必须加载软件包.

Even after installing a package, you have to load a package each time you load R.

在r-faq中,该问题得到了全面解答:

This question is answered comprehensively in the r-faq:

错误:在R中找不到函数...

这篇关于在R错误中使用ggplot函数:找不到函数ggplot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆