前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >从零开始配置R编程语言软件环境

从零开始配置R编程语言软件环境

作者头像
生信技能树
发布2023-12-28 15:15:49
2300
发布2023-12-28 15:15:49
举报
文章被收录于专栏:生信技能树

编程语言软件环境主要指的是r语言软件本身以及配套的IDE软件,最近我的rsutdio这个ide人家一直提示我要更新,考虑到教学的需要,就彻底更新给大家看!

一直提示我要更新

而且很多人遇到了seurat版本问题 :

seurat版本问题

因为新手第一次安装,默认安装最新版,r语言软件,rstudio这个ide软件,里面的各个包!

代码语言:javascript
复制
> .libPaths()
[1] "C:/Users/jimmy/AppData/Local/R/win-library/4.3"
[2] "C:/Program Files/R/R-4.3.1/library"      

我的seurat是v4,但是初学者现在开始默认安装的都是v5,会冲突。下面是我找得到目前为止(2023年12月22日)最新的下载链接,我来给大家演示一下:

  • https://mirrors.tuna.tsinghua.edu.cn/CRAN/
    • https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/base/R-4.3.2-win.exe
  • https://posit.co/download/rstudio-desktop/
    • https://download1.rstudio.org/electron/windows/RStudio-2023.12.0-369.exe

首先可以卸载全部的seurat相关的包(如果有的话),如果你是全新电脑第一次接触r其实不需要卸载包,因为你本来就没有。。。

代码语言:javascript
复制
> library(Seurat)
The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
which was just loaded, will retire in October 2023.
Please refer to R-spatial evolution reports for details, especially
https://r-spatial.org/r/2023/05/15/evolution4.html.
It may be desirable to make the sf package available;
package maintainers should consider adding sf to Suggests:.
The sp package is now running under evolution status 2
     (status 2 uses the sf package in place of rgdal)
Attaching SeuratObject
> detach("package:Seurat", unload = TRUE)
> detach("package:SeuratObject", unload = TRUE)

一个简单的快捷方式,需要进去自己的r包所在的目录,然后终端输入 。。。

代码语言:javascript
复制
 ~/AppData/Local/R/win-library/4.3
$ ls -d  *eurat*
Seurat/                      mousecortexref.SeuratData/
SeuratObject/                panc8.SeuratData/
bmcite.SeuratData/           pancreasref.SeuratData/
bonemarrowref.SeuratData/    pbmc3k.SeuratData/
cbmc.SeuratData/             pbmcMultiome.SeuratData/
celegans.embryo.SeuratData/  pbmcref.SeuratData/
fetusref.SeuratData/         pbmcsca.SeuratData/
hcabm40k.SeuratData/         ssHippo.SeuratData/
humancortexref.SeuratData/   stxBrain.SeuratData/
ifnb.SeuratData/             stxKidney.SeuratData/
kidneyref.SeuratData/        thp1.eccite.SeuratData/
lungref.SeuratData/

接下来就可以安装最新版了:

代码语言:javascript
复制
rm(list = ls()) 
options()$repos 
options()$BioC_mirror
#options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")
options(BioC_mirror="http://mirrors.tuna.tsinghua.edu.cn/bioconductor/")
options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
options()$repos 
options()$BioC_mirror 
options()$repos
install.packages('Seurat')
install.packages('WGCNA') 

是不是超级简单:

最新版

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2023-12-22,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 生信技能树 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档