R 安装flextable库时出错

R 安装flextable库时出错,r,dataframe,dplyr,tidyverse,R,Dataframe,Dplyr,Tidyverse,在r studio上安装flextable库时,我遇到以下错误 ERROR: configuration failed for package ‘systemfonts’ * removing ‘/home/user/R/x86_64-pc-linux-gnu-library/3.2/systemfonts’ Warning in install.packages : installation of package ‘systemfonts’ had non-zero exit status

在r studio上安装flextable库时,我遇到以下错误

ERROR: configuration failed for package ‘systemfonts’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/3.2/systemfonts’
Warning in install.packages :
  installation of package ‘systemfonts’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘gdtools’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/3.2/gdtools’
Warning in install.packages :
  installation of package ‘gdtools’ had non-zero exit status
ERROR: dependency ‘gdtools’ is not available for package ‘flextable’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/3.2/flextable’
Warning in install.packages :
  installation of package ‘flextable’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpN2KD39/downloaded_packages’

尝试安装错误消息显式调用的依赖项:

install.packages("systemfonts")
install.packages("gdtools")
install.packages("flextable")

@Sophia Wilson您的R版本是非常旧的3.2。在按照以下方式安装新软件包之前,您应该升级您的R版本。如果你的组织不允许你升级R版本,你应该考虑学习尽可能多地使用Basic R,或者使用像JooYter笔记本这样的井手/环境。p>
# Install pacakges if they are not already installed: necessary_packages => character vector
necessary_packages <- c("flextable")

# Create a vector containing the names of any packages needing installation:
# new_pacakges => character vector
new_packages <- necessary_packages[!(necessary_packages %in%
                                       installed.packages()[, "Package"])]

# If the vector has more than 0 values, install the new pacakges
# (and their) associated dependencies: varied => stdout
if(length(new_packages) > 0){install.packages(new_packages, dependencies = TRUE)}

# Initialise the packages in the session: bool => stdout
lapply(necessary_packages, require, character.only = TRUE)
#如果尚未安装包,则安装包:必需的_包=>字符向量
必要的字符向量
新包装标准件
if(length(new_packages)>0){install.packages(new_packages,dependencies=TRUE)}
#初始化会话中的包:bool=>stdout
lapply(必需的包,require,character.only=TRUE)

我已经尝试过了,在install.packages中出现错误
警告:“systemfonts”软件包的安装具有非零退出状态下载的源程序包位于“/tmp/RtmpE9BewA/downloaded_packages”中。