R语言安装软件包[通俗易懂]

R语言安装软件包[通俗易懂]R语言安装软件包1打开RGui.exe,执行“`install.packages(“softwarename”)“`,安装成功后会提示“`Thedownloadedbinarypackagesarein…“`,给出了程序包存放路径2选择程序包,点击“`Installpackage(s)fromlocalfiles…“`,选中路径里面下载好的程序包,会出现“`successfullyunpacked“`的提示3命令及执行结果示例1打开RGui.exe,

大家好,又见面了,我是你们的朋友全栈君。

1 打开RGui.exe,执行install.packages("software name"),安装成功后会提示The downloaded binary packages are in ...,给出了程序包存放路径

在这里插入图片描述

2 选择程序包,点击Install package(s) from local files...,选中路径里面下载好的程序包,会出现successfully unpacked的提示

> utils:::menuInstallLocal()
package ‘psych’ successfully unpacked and MD5 sums checked

在这里插入图片描述
在这里插入图片描述

3 命令及执行结果示例

R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R是自由软件,不带任何担保。
在某些条件下你可以将其自由散布。
用'license()'或'licence()'来看散布的详细条件。

R是个合作计划,有许多人为之做出了贡献.
用'contributors()'来看合作者的详细情况
用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。

用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或
用'help.start()'通过HTML浏览器来看帮助文件。
用'q()'退出R.

> install.package("psych")
Error in install.package("psych") : 没有"install.package"这个函数
> install.packages("psych")
--- 在此連線階段时请选用CRAN的鏡子 ---
还安装相依关系‘tmvnsim’, ‘mnormt’

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/tmvnsim_1.0-2.zip'
Content type 'application/zip' length 37073 bytes (36 KB)
downloaded 36 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/mnormt_2.0.2.zip'
Content type 'application/zip' length 193615 bytes (189 KB)
downloaded 189 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/psych_2.1.9.zip'
Content type 'application/zip' length 4245236 bytes (4.0 MB)
downloaded 4.0 MB

package ‘tmvnsim’ successfully unpacked and MD5 sums checked
package ‘mnormt’ successfully unpacked and MD5 sums checked
package ‘psych’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\99\AppData\Local\Temp\RtmpEDx6Cz\downloaded_packages
> local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
> setRepositories()
> utils:::menuInstallLocal()
package ‘psych’ successfully unpacked and MD5 sums checked
> install.packages("ggplot2")
还安装相依关系‘colorspace’, ‘cli’, ‘crayon’, ‘utf8’, ‘farver’, ‘labeling’, ‘lifecycle’, ‘munsell’, ‘R6’, ‘RColorBrewer’, ‘viridisLite’, ‘ellipsis’, ‘fansi’, ‘magrittr’, ‘pillar’, ‘pkgconfig’, ‘vctrs’, ‘digest’, ‘glue’, ‘gtable’, ‘isoband’, ‘rlang’, ‘scales’, ‘tibble’, ‘withr’


  有二进制版本的,但源代码版本是后来的:
      binary source needs_compilation
fansi  0.5.0  1.0.0              TRUE

  Binaries will be installed
试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/colorspace_2.0-2.zip'
Content type 'application/zip' length 2645168 bytes (2.5 MB)
downloaded 2.5 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/cli_3.1.0.zip'
Content type 'application/zip' length 1235892 bytes (1.2 MB)
downloaded 1.2 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/crayon_1.4.2.zip'
Content type 'application/zip' length 157657 bytes (153 KB)
downloaded 153 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/utf8_1.2.2.zip'
Content type 'application/zip' length 209987 bytes (205 KB)
downloaded 205 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/farver_2.1.0.zip'
Content type 'application/zip' length 1752511 bytes (1.7 MB)
downloaded 1.7 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/labeling_0.4.2.zip'
Content type 'application/zip' length 62679 bytes (61 KB)
downloaded 61 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/lifecycle_1.0.1.zip'
Content type 'application/zip' length 123104 bytes (120 KB)
downloaded 120 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/munsell_0.5.0.zip'
Content type 'application/zip' length 245327 bytes (239 KB)
downloaded 239 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/R6_2.5.1.zip'
Content type 'application/zip' length 84245 bytes (82 KB)
downloaded 82 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/RColorBrewer_1.1-2.zip'
Content type 'application/zip' length 55707 bytes (54 KB)
downloaded 54 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/viridisLite_0.4.0.zip'
Content type 'application/zip' length 1299512 bytes (1.2 MB)
downloaded 1.2 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/ellipsis_0.3.2.zip'
Content type 'application/zip' length 49237 bytes (48 KB)
downloaded 48 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/fansi_0.5.0.zip'
Content type 'application/zip' length 248821 bytes (242 KB)
downloaded 242 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/magrittr_2.0.1.zip'
Content type 'application/zip' length 235806 bytes (230 KB)
downloaded 230 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/pillar_1.6.4.zip'
Content type 'application/zip' length 1041521 bytes (1017 KB)
downloaded 1017 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/pkgconfig_2.0.3.zip'
Content type 'application/zip' length 22480 bytes (21 KB)
downloaded 21 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/vctrs_0.3.8.zip'
Content type 'application/zip' length 1254380 bytes (1.2 MB)
downloaded 1.2 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/digest_0.6.29.zip'
Content type 'application/zip' length 266579 bytes (260 KB)
downloaded 260 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/glue_1.6.0.zip'
Content type 'application/zip' length 173672 bytes (169 KB)
downloaded 169 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/gtable_0.3.0.zip'
Content type 'application/zip' length 434194 bytes (424 KB)
downloaded 424 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/isoband_0.2.5.zip'
Content type 'application/zip' length 2726788 bytes (2.6 MB)
downloaded 2.6 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/rlang_0.4.12.zip'
Content type 'application/zip' length 1200810 bytes (1.1 MB)
downloaded 1.1 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/scales_1.1.1.zip'
Content type 'application/zip' length 558614 bytes (545 KB)
downloaded 545 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/tibble_3.1.6.zip'
Content type 'application/zip' length 872274 bytes (851 KB)
downloaded 851 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/withr_2.4.3.zip'
Content type 'application/zip' length 217158 bytes (212 KB)
downloaded 212 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/ggplot2_3.3.5.zip'
Content type 'application/zip' length 4130171 bytes (3.9 MB)
downloaded 3.9 MB

package ‘colorspace’ successfully unpacked and MD5 sums checked
package ‘cli’ successfully unpacked and MD5 sums checked
package ‘crayon’ successfully unpacked and MD5 sums checked
package ‘utf8’ successfully unpacked and MD5 sums checked
package ‘farver’ successfully unpacked and MD5 sums checked
package ‘labeling’ successfully unpacked and MD5 sums checked
package ‘lifecycle’ successfully unpacked and MD5 sums checked
package ‘munsell’ successfully unpacked and MD5 sums checked
package ‘R6’ successfully unpacked and MD5 sums checked
package ‘RColorBrewer’ successfully unpacked and MD5 sums checked
package ‘viridisLite’ successfully unpacked and MD5 sums checked
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘fansi’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked
package ‘pillar’ successfully unpacked and MD5 sums checked
package ‘pkgconfig’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘gtable’ successfully unpacked and MD5 sums checked
package ‘isoband’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘withr’ successfully unpacked and MD5 sums checked
package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\99\AppData\Local\Temp\RtmpEDx6Cz\downloaded_packages
> utils:::menuInstallPkgs()
> setRepositories()
> local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
> utils:::menuInstallLocal()
package ‘ggplot2’ successfully unpacked and MD5 sums checked
> install.packages("reshape2")
还安装相依关系‘stringi’, ‘plyr’, ‘Rcpp’, ‘stringr’

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/stringi_1.7.6.zip'
Content type 'application/zip' length 16449819 bytes (15.7 MB)
downloaded 15.7 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/plyr_1.8.6.zip'
Content type 'application/zip' length 1499468 bytes (1.4 MB)
downloaded 1.4 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/Rcpp_1.0.7.zip'
Content type 'application/zip' length 3263155 bytes (3.1 MB)
downloaded 3.1 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/stringr_1.4.0.zip'
Content type 'application/zip' length 216753 bytes (211 KB)
downloaded 211 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/reshape2_1.4.4.zip'
Content type 'application/zip' length 818001 bytes (798 KB)
downloaded 798 KB

package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘plyr’ successfully unpacked and MD5 sums checked
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘stringr’ successfully unpacked and MD5 sums checked
package ‘reshape2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\99\AppData\Local\Temp\RtmpEDx6Cz\downloaded_packages
> utils:::menuInstallLocal()
package ‘reshape2’ successfully unpacked and MD5 sums checked
> install.packages("relaimpo")
还安装相依关系‘minqa’, ‘numDeriv’, ‘DBI’, ‘survey’, ‘mitools’, ‘corpcor’

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/minqa_1.2.4.zip'
Content type 'application/zip' length 855876 bytes (835 KB)
downloaded 835 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/numDeriv_2016.8-1.1.zip'
Content type 'application/zip' length 116205 bytes (113 KB)
downloaded 113 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/DBI_1.1.2.zip'
Content type 'application/zip' length 741793 bytes (724 KB)
downloaded 724 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/survey_4.1-1.zip'
Content type 'application/zip' length 2728411 bytes (2.6 MB)
downloaded 2.6 MB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/mitools_2.4.zip'
Content type 'application/zip' length 298648 bytes (291 KB)
downloaded 291 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/corpcor_1.6.10.zip'
Content type 'application/zip' length 115070 bytes (112 KB)
downloaded 112 KB

试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/relaimpo_2.2-6.zip'
Content type 'application/zip' length 562932 bytes (549 KB)
downloaded 549 KB

package ‘minqa’ successfully unpacked and MD5 sums checked
package ‘numDeriv’ successfully unpacked and MD5 sums checked
package ‘DBI’ successfully unpacked and MD5 sums checked
package ‘survey’ successfully unpacked and MD5 sums checked
package ‘mitools’ successfully unpacked and MD5 sums checked
package ‘corpcor’ successfully unpacked and MD5 sums checked
package ‘relaimpo’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\99\AppData\Local\Temp\RtmpEDx6Cz\downloaded_packages
> install.packages("MASS")
试开URL’https://cloud.r-project.org/bin/windows/contrib/4.1/MASS_7.3-54.zip'
Content type 'application/zip' length 1191296 bytes (1.1 MB)
downloaded 1.1 MB

package ‘MASS’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘MASS’
Warning: restored ‘MASS’

The downloaded binary packages are in
        C:\Users\99\AppData\Local\Temp\RtmpEDx6Cz\downloaded_packages
Warning message:
In file.copy(savedcopy, lib, recursive = TRUE) :
  拷贝D:\R\R-4.1.2\library\00LOCK\MASS\libs\x64\MASS.dll到D:\R\R-4.1.2\library\MASS\libs\x64\MASS.dll时出了问题:Permission denied 
> utils:::menuInstallLocal()
package ‘relaimpo’ successfully unpacked and MD5 sums checked
> remove.packages(c("relaimpo"))
从‘D:/R/R-4.1.2/library’中删除程序包
(因为没有指定‘lib’)
> remove.packages(c("relaimpo"),lib = file .path("path", "to", "library"))
错误: unexpected symbol在"remove.packages(c("relaimpo"),lib = file .path"里
> remove.packages(c("relaimpo"),lib = file.path("path", "to", "library"))
Error in find.package(pkgs, lib) : 不存在叫‘relaimpo’这个名字的程辑包
> remove.packages(c("relaimpo"),lib=file.path("path", "to", "library"))
Error in find.package(pkgs, lib) : 不存在叫‘relaimpo’这个名字的程辑包
> utils:::menuInstallLocal()
package ‘relaimpo’ successfully unpacked and MD5 sums checked
> install.packages("packfor")
Warning message:
package ‘packfor’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages 
> utils:::menuInstallLocal()
package ‘R.matlab’ successfully unpacked and MD5 sums checked
> 
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/153542.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长

相关推荐

  • ORACLE 毫秒与日期的相互转换

    ORACLE 毫秒与日期的相互转换

    2022年2月3日
  • scp和rsync命令[通俗易懂]

    scp和rsync命令[通俗易懂]SCP命令(1)scp定义scp可以实现服务器与服务器之间的数据拷贝。(fromserver1toserver2)(2)基本语法scp-r$pdir/$fname$user@$host:$pdir/$fname命令递归要拷贝的文件路径/名称目的地用户@主机:目的地路径/名称(3)基本示例scp-rjdk1.8.0_291/root@hadoop103:opt/modulescp-rroot@hadoop102:/opt/module/*root@h

    2022年8月30日
  • oracle数据库用户更改密码_oracle用户密码忘记了

    oracle数据库用户更改密码_oracle用户密码忘记了我用的另一种方法,在dbeaver中打开sql编辑器,密令和下面所说一致1.WIN+R打开运行窗口,输入cmd进入命令行:输入sqlplus,输入用户名,输入口令(如果是超级管理员SYS的话需在口令之后加上assysdba)进入sql命令行;连接成功后,输入“selectusernamefromdba_users”查看用户列表。3.若修改某一个用户密码,修改用户口令格式为:alteruser用户名identifiedby新密码;4.以apps为例,密码修改为

    2022年7月28日
  • python基础系列教程——Python的安装与测试:python解释器、PyDev编辑器、pycharm编译器

    python基础系列教程——Python的安装与测试:python解释器、PyDev编辑器、pycharm编译器全栈工程师开发手册(作者:陈玓玏)python教程全解白手起家,从头开启python的开发环境搭建。一.如何安装Python在https://www.python.org/下载安装包。下载下来一个exe文件,直接双击运行。选择InstallNow,立即安装。配置环境变量:右键开始——控制面板——系统——高级系统配置——环境变量。找…

    2022年7月23日
  • findstr 用法

    findstr 用法http://bathome.l3.wuyou.com/thread-11159-1-6.html/B在一行的开始配对模式。——只在行开头搜索。/E在一行的结尾配对模式。——只在行结尾搜索。/L按字使用搜索字符串。——具体不详,可以与/r参数替换测试。

    2022年10月26日
  • 回溯递归算法—-八皇后问题

    回溯递归算法—-八皇后问题

    2022年1月2日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号