gpt4 book ai didi

r - 无法安装ggp​​lot “package ‘ggplot’”和 “subscript out of bounds”错误

转载 作者:行者123 更新时间:2023-12-04 04:52:21 33 4
gpt4 key购买 nike

$ R
R version 2.12.2 (2011-02-25)
Platform: i486-pc-linux-gnu (32-bit)

> install.packages("ggplot")
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘ggplot’ is not available

> install.packages("ggplot", dep="T")
Error in apply(available[p1, dependencies, drop = FALSE], 1L, function(x) paste(x[!is.na(x)], :
subscript out of bounds
In addition: Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘ggplot’ is not available

> install.packages("ggplot", dep="T", type="source")
Error in apply(available[p1, dependencies, drop = FALSE], 1L, function(x) paste(x[!is.na(x)], :
subscript out of bounds
In addition: Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘ggplot’ is not available

如何安装 ggplot

最佳答案

您输入的软件包名称错误-几年前Hadley进行了重大重写,现在它是ggplot2。我认为旧的ggplot包已从CRAN中删除。

install.packages("ggplot2", dependencies = TRUE)

这是我得到的:
R> install.packages("ggplot2", dependencies = TRUE)
Installing package(s) into ‘/home/gavin/R/libs’
(as ‘lib’ is unspecified)
trying URL 'http://cran.uk.r-project.org/src/contrib/ggplot2_0.8.9.tar.gz'
Content type 'application/x-gzip' length 2074749 bytes (2.0 Mb)
opened URL
==================================================
downloaded 2.0 Mb

* installing *source* package ‘ggplot2’ ...
** R
** data
** moving datasets to lazyload DB
** inst
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded

* DONE (ggplot2)

The downloaded packages are in
‘/tmp/RtmpPcn8bl/downloaded_packages’

关于r - 无法安装ggp​​lot “package ‘ggplot’”和 “subscript out of bounds”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5522830/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com