【问题标题】:How to install googleVis into Anaconda R for windows如何将 googleVis 安装到 Anaconda R for windows
【发布时间】:2016-06-12 21:23:33
【问题描述】:

Anaconda 是一个科学的 Python 发行版,可以通过安装一个使用 R 的统计功能的包来增强它

>conda install -c r r-essentials

但是,我还需要使用 googleVIS,即 Google Charts API 的 R 接口。

推荐的解决方案是这样的:

conda install -c gusdunn r-googlevis=0.5.10

但它不存在于 windows,仅适用于 linux 和 OSX。

anaconda search -t conda r-googlevis

揭示

Packages:
     Name                      |  Version | Package Types   | Platforms
     ------------------------- |   ------ | --------------- | ---------------
     bioconda/r-googlevis      |   0.5.10 | conda           | linux-64, osx-64
                                          : R interface to Google Charts API, allowing users to create interactive charts based on data frames. Charts  are displayed locally via the R HTTP help server. A modern browser with Internet connection is required and for some charts a Flash player. The data remains local and is not uploaded to Google.
     gusdunn/r-googlevis       |   0.5.10 | conda           | linux-64, osx-64
                                          : R interface to Google Charts API, allowing users to create interactive charts based on data frames. Charts  are displayed locally via the R HTTP help server. A modern browser with Internet connection is required and for some charts a Flash player. The data remains local and is not uploaded to Google.
Found 2 packages

我找到了 googleVIS here 的 Windows 二进制文件:

但我不知道如何让它“进入”anaconda。有人可以对此有所了解吗?

【问题讨论】:

    标签: python r package


    【解决方案1】:

    好吧,我启动了 jupyter notebook(当然我的 anaconda 安装了 r Essentials)。然后我在一个单元格中输入了我通常会在 R 控制台中输入的内容:

    install.packages('googleVis')
    

    它告诉我不要在不选择镜子的情况下尝试使用 cran。所以我就这样做了

    options(repos=structure(c(CRAN="https://cloud.r-project.org/")))
    install.packages('googleVis')
    

    现在它似乎工作了。 我什至可以退出 jupyter 并重新启动它的全新实例,然后 googleVIS 就可以工作了。

    【讨论】:

      【解决方案2】:

      我在 CRAN 上找到了一个“googleVis”包。从 R 试试这个:

      install.packages('googleVis')
      

      编辑:您可以直接从 Jupyter Notebook 中安装软件包(有关详细信息,请参阅此处发布的其他答案)或从 Anaconda 安装(通常为 C:\Anaconda3\scripts\R.exe)中以控制台模式启动 R 并使用来自那里的 intsall.packages 命令。

      【讨论】:

      • 我知道我可以将 googleVIS 安装到这样的 R 环境中。但我需要在 Anaconda Python 中使用那个 R 包!然后我可以有一个允许 R 和 python 的 jupyter notebook。将R安装到python中见下一行注释
      • 这就是我安装要在 Jupyter 笔记本中使用的 R 包的方式,所以也许我遗漏了一些东西。再说一次,在 Jupyter 中,我只使用 Python 或 R,而不是同时使用两者。
      • 带有选项(repos)的好发现。以前要将软件包安装到我的 jupyter 安装中,我必须进入命令行并在控制台模式下启动 R。很高兴看到您可以使用 jupyter 安装软件包。
      猜你喜欢
      • 1970-01-01
      • 2020-10-30
      • 2017-12-03
      • 2014-07-22
      • 1970-01-01
      • 2021-08-23
      • 2017-01-12
      • 2019-01-26
      • 1970-01-01
      相关资源
      最近更新 更多