经过深入研究,我决定把我的问题发出来。我需要处理一些图形,所以我决定安装ggplot2软件包。
我所做的是:
install.packages("ggplot2")
require(ggplot2)
但是什么都没有发生,当我尝试使用ggplot时,会出现类似于“找不到函数”“ggplot2”的东西,就好像包从未安装过一样。
我想这与下载包的目录有关,但说真的,根本不知道。
我使用以下代码获得错误:
ggplot2(data=tweets, aes(tweets$created_at)) +
geom_bar(aes(fill=..count..), alpha=0.5, size=0.5, binwidth=60*5) +
scale_x_datetime("tweets$created_at") +
scale_y_continuous("Number of tweets")
以任何方式粘贴“安装”后显示的内容:
install.packages("ggplot2") “0.9.3.1.tgz”内容类型‘application/x’长度为2647855字节(2.5Mb) URL aperto
==================================================
下载2.5 Mb 下载的二进制包在/var/folders/zr/t7y5pvy94n557yv7pv2hlx6r0000gn/T//Rtmp1mD2Vi/downloaded_packages中。
我们将非常感谢您的帮助。
发布于 2013-12-22 01:33:23
我认为所有的下载都是正确的,你使用了错误的函数名。使用ggplot
而不是ggplot2
,即
ggplot(data=tweets, aes(x = created_at)) +
geom_bar(aes(fill=..count..), alpha=0.5, size=0.5, binwidth=60*5)
此外,不要在$
调用中使用aes
。
https://stackoverflow.com/questions/20725277
复制相似问题