如何在 R 中安装包
How to install package in R
我想在 R 中安装包:nloptr
、seriation
、pbkrtest
、NbClust
、cluster
、car
、scales
、fpc
、mclust
、apcluster
、vegan
在我的 powerbi 上使用它,因为 k 表示聚类。
我已经在 windows 中安装了 R 3.3.1。我这样打开我的 R:
我已经尝试过使用两个命令来安装这样的软件包:
install.packages("D:/Skripsi/PowerBI-visuals-clustering-kmeans-master.zip', lib='C:/Program Files/R/R-3.3.1',repos = NULL)
install.packages.zip("D:/Skripsi/PowerBI-visuals-clustering-kmeans-master.zip", repos = NULL)
但是我得到一个错误
no function install.package.zip or no such file.
我的包裹位置:D:\Skripsi\PowerBI-visuals-clustering-kmeans-master
我想使用这个包:https://github.com/Microsoft/PowerBI-visuals-clustering-kmeans 还是我必须一个一个安装以及如何在 R 中安装包?谢谢
您 link GitHub 上的存储库不在有效的 R 包结构中,因此无法安装。您最好下载文件,将它们解压缩到本地并获取(使用函数 source
,请参阅 help("source")
)您可能想要使用的任何 R 脚本。
至于其余部分,基本 R 安装中没有名为 install.packages.zip
的函数。当我从本地 zip 文件安装包时(虽然很少),我使用
install.packages("/path/to/zipfile.zip", repos = NULL)
它似乎工作正常。如前所述,这不适用于您的 "PowerBI-visuals-clustering-kmeans-master.zip".
要安装您提到的软件包,您应该按照
install.packages(c("nloptr", "seriation", "pbkrtest", "NbClust", "cluster", "car", "scales", "fpc", "mclust", "apcluster", "vegan"))
如果是“普通”包:
install.packages("NAME_OF_YOUR_PACKAGE")
它是一个“生物导体”包:
source("https://bioconductor.org/biocLite.R")
biocLite(NAME_OF_YOUR_PACKAGE)
我想在 R 中安装包:nloptr
、seriation
、pbkrtest
、NbClust
、cluster
、car
、scales
、fpc
、mclust
、apcluster
、vegan
在我的 powerbi 上使用它,因为 k 表示聚类。
我已经在 windows 中安装了 R 3.3.1。我这样打开我的 R:
我已经尝试过使用两个命令来安装这样的软件包:
install.packages("D:/Skripsi/PowerBI-visuals-clustering-kmeans-master.zip', lib='C:/Program Files/R/R-3.3.1',repos = NULL)
install.packages.zip("D:/Skripsi/PowerBI-visuals-clustering-kmeans-master.zip", repos = NULL)
但是我得到一个错误
no function install.package.zip or no such file.
我的包裹位置:D:\Skripsi\PowerBI-visuals-clustering-kmeans-master
我想使用这个包:https://github.com/Microsoft/PowerBI-visuals-clustering-kmeans 还是我必须一个一个安装以及如何在 R 中安装包?谢谢
您 link GitHub 上的存储库不在有效的 R 包结构中,因此无法安装。您最好下载文件,将它们解压缩到本地并获取(使用函数 source
,请参阅 help("source")
)您可能想要使用的任何 R 脚本。
至于其余部分,基本 R 安装中没有名为 install.packages.zip
的函数。当我从本地 zip 文件安装包时(虽然很少),我使用
install.packages("/path/to/zipfile.zip", repos = NULL)
它似乎工作正常。如前所述,这不适用于您的 "PowerBI-visuals-clustering-kmeans-master.zip".
要安装您提到的软件包,您应该按照
install.packages(c("nloptr", "seriation", "pbkrtest", "NbClust", "cluster", "car", "scales", "fpc", "mclust", "apcluster", "vegan"))
如果是“普通”包:
install.packages("NAME_OF_YOUR_PACKAGE")
它是一个“生物导体”包:
source("https://bioconductor.org/biocLite.R")
biocLite(NAME_OF_YOUR_PACKAGE)