首先创建CPAN的环境
# update indices
apt update -qq
# install two helper packages we need
apt install --no-install-recommends software-properties-common dirmngr
# import the signing key (by Michael Rutter) for these repo
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -sc)-cran40/"
然后进行R语言主程序的安装:
apt install --no-install-recommends r-base
将CRAN上R包的index读取到本地:
add-apt-repository ppa:c2d4u.team/c2d4u4.0+
R包安装(示例):
sudo apt install --no-install-recommends r-cran-tidyverse
以上
网友评论