gpt4 book ai didi

r - 在 ubuntu 上安装 ggplot2 包

转载 作者:太空宇宙 更新时间:2023-11-03 16:50:31 24 4
gpt4 key购买 nike

我正在使用 R 3.1 和 Rstudio 0.98.507 在 VM 中运行的 ubuntu precise pangolin 上,但我无法安装 ggplot2

这是输出:

install.packages('ggplot2')

Installing package into ‘/home/uwhpsc/R/i686-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘colorspace’, ‘Rcpp’, ‘stringr’, ‘RColorBrewer’, ‘dichromat’, ‘munsell’, ‘labeling’, ‘plyr’, ‘digest’, ‘gtable’, ‘reshape2’, ‘scales’, ‘proto’

trying URL 'http://cran.rstudio.com/src/contrib/colorspace_1.2-4.tar.gz'
Content type 'application/x-gzip' length 242791 bytes (237 Kb)
opened URL
==================================================
downloaded 237 Kb

trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.11.1.tar.gz'
Content type 'application/x-gzip' length 2003515 bytes (1.9 Mb)
opened URL
==================================================
downloaded 1.9 Mb

trying URL 'http://cran.rstudio.com/src/contrib/stringr_0.6.2.tar.gz'
Content type 'application/x-gzip' length 20636 bytes (20 Kb)
opened URL
==================================================
downloaded 20 Kb

trying URL 'http://cran.rstudio.com/src/contrib/RColorBrewer_1.0-5.tar.gz'
Content type 'application/x-gzip' length 10656 bytes (10 Kb)
opened URL
==================================================
downloaded 10 Kb

trying URL 'http://cran.rstudio.com/src/contrib/dichromat_2.0-0.tar.gz'
Content type 'application/x-gzip' length 84320 bytes (82 Kb)
opened URL
==================================================
downloaded 82 Kb

trying URL 'http://cran.rstudio.com/src/contrib/munsell_0.4.2.tar.gz'
Content type 'application/x-gzip' length 91026 bytes (88 Kb)
opened URL
==================================================
downloaded 88 Kb

trying URL 'http://cran.rstudio.com/src/contrib/labeling_0.2.tar.gz'
Content type 'application/x-gzip' length 9998 bytes
opened URL
==================================================
downloaded 9998 bytes

trying URL 'http://cran.rstudio.com/src/contrib/plyr_1.8.1.tar.gz'
Content type 'application/x-gzip' length 393233 bytes (384 Kb)
opened URL
==================================================
downloaded 384 Kb

trying URL 'http://cran.rstudio.com/src/contrib/digest_0.6.4.tar.gz'
Content type 'application/x-gzip' length 79309 bytes (77 Kb)
opened URL
==================================================
downloaded 77 Kb

trying URL 'http://cran.rstudio.com/src/contrib/gtable_0.1.2.tar.gz'
Content type 'application/x-gzip' length 19667 bytes (19 Kb)
opened URL
==================================================
downloaded 19 Kb

trying URL 'http://cran.rstudio.com/src/contrib/reshape2_1.4.tar.gz'
Content type 'application/x-gzip' length 34121 bytes (33 Kb)
opened URL
==================================================
downloaded 33 Kb

trying URL 'http://cran.rstudio.com/src/contrib/scales_0.2.4.tar.gz'
Content type 'application/x-gzip' length 40093 bytes (39 Kb)
opened URL
==================================================
downloaded 39 Kb

trying URL 'http://cran.rstudio.com/src/contrib/proto_0.3-10.tar.gz'
Content type 'application/x-gzip' length 530758 bytes (518 Kb)
opened URL
==================================================
downloaded 518 Kb

trying URL 'http://cran.rstudio.com/src/contrib/ggplot2_0.9.3.1.tar.gz'
Content type 'application/x-gzip' length 2330942 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb


The downloaded source packages are in
‘/tmp/Rtmpi3YRSS/downloaded_packages’
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’

最佳答案

如果您没有启用交换文件并且内存不足,OOM(内存不足) killer 通常会终止有问题的进程。这在尝试安装软件包时以 OP 问题中描述的方式表现出来。要解决此问题,应启用交换文件。

$ dd if=/dev/zero of=/swapfile bs=1024 count=512k

$ mkswap /swapfile
$ swapon /swapfile

您可以更改交换文件的属性,例如 swappiness 参见示例 here .

关于r - 在 ubuntu 上安装 ggplot2 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23750740/

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