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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Eclipse的环境配置

    Eclipse的环境配置1、想要配置Eclipse的环境,就要先下载Eclipse,并安装它,不会下载安装的小伙伴可以点击下面给的链接,里面有我写的详细的教程,这里就不重复了Eclipse下载与安装:https://blog.csdn.net/qq_39135287/article/details/821080802、接下来我们重点讲一下Eclipse的环境配置2.1、修改Eclip…

    2022年5月18日
    41
  • QGIS 3.0 使用教程

    QGIS 3.0 使用教程网易云课堂:https://study.163.com/course/courseMain.htm?courseId=1005249002&utm_campaign=commission&utm_source=cp-400000000343054&utm_medium=share课程中所需要的数据和地图服务地址从这里下载:链接:https://pan…

    2022年6月16日
    32
  • 【MySQL】使用Visio绘制数据库关系模型图

    【MySQL】使用Visio绘制数据库关系模型图使用Visio绘制数据库关系模型图1新建项目文件—新建–软件和数据库—数据库模型图点击后,出现如下界面:2绘制左侧“实体关系”中将“实体”形状拖放到绘制界面,如下图3编辑实体名称,如下图:4编辑列点击“列”如下图:完成实体:客人信息表GuestRecord,如下截图完成实体:客房表Room(同上操作),如下图5关系绑定5.1添加列RoomID到客人信息表5.2将“实体关系”中的关系工具拖放到某个实体上(鼠标不松开),直到该实体边框变红色,松开;箭头指

    2022年7月16日
    14
  • Method getMethod

    转自:https://www.cnblogs.com/douder/p/7237883.htmlMethod getMethod(String name, Class&lt;?&gt;… parameterTypes) –返回一个 Method 对象,它反映此 Class 对象所表示的类或接口的指定公共成员方法。 方法后面接收的就是Class类的对象,而如:String.class、i…

    2021年11月30日
    51
  • linuxiostat命令详解_ifstat命令

    linuxiostat命令详解_ifstat命令Linuxiostat命令详解iostat主要用于监控系统设备的IO负载情况,根据这个可以看出当前系统的写入量和读取量,CPU负载和磁盘负载。1.命令格式:iostat参数时间次数2.命令参数:-C显示CPU使用情况-d显示磁盘使用情况-k以KB为单位显示-m以M为单位显示-N显示磁盘阵列(LVM)信息-n显示NFS使用情况-p[磁盘]显示磁盘和分区的情况-t显示终端和CPU的信息-x显示详细信息-V显示版本信息3.常用

    2022年10月6日
    2
  • 第三章,springboot 部分注解讲解,和多配置文件加载方式[通俗易懂]

    第三章,springboot 部分注解讲解,和多配置文件加载方式[通俗易懂]第三章,springboot 部分注解讲解,和多配置文件加载方式

    2022年4月24日
    39

发表回复

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

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