使用 Shiny 时,包 rcpp 不适用于(R 版本 2.15.2)

Posted

技术标签:

【中文标题】使用 Shiny 时,包 rcpp 不适用于(R 版本 2.15.2)【英文标题】:Package rcpp is not available for (R version 2.15.2) when Working with Shiny 【发布时间】:2014-06-23 06:01:35 【问题描述】:

这是我收到的消息,我不知道在哪里将 R 更新到 3.0.0,资源会有所帮助。我已经在网上搜寻了对这个确切问题有明确答案的人。

R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computin
ISBN 3-900051-07-0
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an html browser interface to help.
Type 'q()' to quit R.
install.packages('Rcpp', repos='http://cran.rstudio.com/')
# Installing package(s) into ‘/usr/lib64/R/library’
# (as ‘lib’ is unspecified)
# Warning message:
# package ‘Rcpp’ is not available (for R version 2.15.2)

【问题讨论】:

可以从the website下载新版R吗? 您将需要更新 R 或安装旧版本的 Rcpp 包(可从 http://cran.rstudio.com/src/contrib/Archive/Rcpp 获得)最新版本需要 R 3.0.0 【参考方案1】:

我相信你需要Rcpp,注意大写。检查CRAN page for Rcpp,看来 Rcpp 现在需要 R 3.0.0 或更高版本。我在 CentOS 上并且有 3.0.2,但遗憾的是不记得我是如何更新的。

【讨论】:

返回的错误实际上是小写包'rcpp'不可用(对于R版本2.15.2) 是的,因为没有rcpp包,但是有Rcpp包。

以上是关于使用 Shiny 时,包 rcpp 不适用于(R 版本 2.15.2)的主要内容,如果未能解决你的问题,请参考以下文章

在 Windows 上使用 C++11 和 Rcpp 构建 R 包

MAGMA 和 Rcpp 用于 R 中的线性代数

从使用 devtools 加载的包中设置 ReferenceClass 时,R 中的 Shiny 出错

如何在 r shiny 中使用 JS 数据表 API?

如何分析 Rcpp 代码(在 linux 上)

使用 Rcpp 在 R 包中添加外部库