首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装flextable库时出现错误

安装flextable库时出现错误
EN

Stack Overflow用户
提问于 2020-04-21 09:23:26
回答 2查看 1.2K关注 0票数 3

当我在r工作室安装flextable库时,我得到了以下错误。

代码语言:javascript
复制
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’
EN

回答 2

Stack Overflow用户

发布于 2020-04-21 11:54:57

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

代码语言:javascript
复制
install.packages("systemfonts")
install.packages("gdtools")
install.packages("flextable")
票数 0
EN

Stack Overflow用户

发布于 2020-04-24 12:13:06

@索菲亚·威尔逊你的R版本是非常旧的3.2。在以下面的方式安装新的软件包之前,您应该升级R版本。如果您的组织不允许您升级R版本,您应该考虑学习尽可能多地使用Base R进行工作,或者使用像Jupyter Notebook这样的IDE/环境。

代码语言:javascript
复制
# 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)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61334537

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档