当前位置:网站首页>R语言中如何查看已安装的R包
R语言中如何查看已安装的R包
2022-07-04 03:52:00 【育种数据分析之放飞自我】
在R语言中,如何查看已安装的R包,已加载的包,可以通过下面一些命令。
1. 查看已安装的包
installed.packages()
它会给出来,所有已安装的R包的详细信息,包括包名,路径,版本,优先级,建议等
提取已安装的包名:
as.data.frame(installed.packages())$Package
2. 查看已加载的R包
这里的小括号不可以省略
(.packages())
可以看到,默认加载了7个基础包。
如果不想加载,可以从内存中去除(这里不是删除),用detach
:
注意,这里双引号必须有,packages:
必须有
detach("package:stats")
我们看到,stats已经被去除了。
想要加载回来,用library()
library(stats)
可以看到,stats又在内存中了
3. 安装和卸载R包
安装R包,如果是在CRAN中,直接用install.packages()
,
install.packages("ggplot2")
加载一下,看看是否成功:
> library(ggplot2)
RStudio Community is a great place to get help:
https://community.rstudio.com/c/tidyverse
删除R包,用remove.packages()
remove.packages("ggplot2")
4. 更新R包
更新R包,用update.packages()
update.packages("ggplot2")
5. 查看R包版本
载入R包,然后用:sessionInfor()
可以看到,ggplot2的版本是:3.3.6
边栏推荐
- Confession code collection, who says program apes don't understand romance
- ctf-pikachu-XSS
- [microservice openfeign] use openfeign to remotely call the file upload interface
- leetcode刷题:二叉树04(二叉树的层序遍历)
- Tcpclientdemo for TCP protocol interaction
- The new data center helps speed up the construction of a digital economy with data as a key element
- [webrtc] M98 Ninja build and compile instructions
- 干货!基于GAN的稀有样本生成
- How to telecommute more efficiently | community essay solicitation
- RHCSA 08 - automount配置
猜你喜欢
【罗技】m720
LNK2038 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MDd_DynamicDebug”(main.obj 中)
Flink学习6:编程模型
Redis:哈希hash类型数据操作命令
Perf simple process for multithreaded profile
02 specific implementation of LS command
Mitsubishi M70 macro variable reading Mitsubishi M80 public variable acquisition Mitsubishi CNC variable reading acquisition Mitsubishi CNC remote tool compensation Mitsubishi machine tool online tool
Katalon framework test web (XXVI) automatic email
There is a problem that the package cannot be parsed in the like project
ctf-pikachu-CSRF
随机推荐
Pointer array and array pointer
laravel admin里百度编辑器自定义路径和文件名
线程常用的方法
STM32 external DHT11 display temperature and humidity
Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure
vim正确加区间注释
Flink learning 6: programming model
Flink learning 7: application structure
疫情来袭--远程办公之思考|社区征文
C language bidirectional linked list first edition
Global exposure and roller shutter exposure of industrial cameras
Idea modify body color
[microservice openfeign] use openfeign to remotely call the file upload interface
【读书会第十三期】视频文件的封装格式
[book club issue 13] packaging format of video files
(指针)自己写一个比较字符串大小的函数,功能与strcmp类似。
批处理初识
Exercises in quantum mechanics
Common methods of threads
北漂程序员,月薪20K,一年攒15W,正常吗?