R安裝package報錯:
[root@Hadoop-NN-01 mysofts]# R CMD INSTALL trimcluster_0.1-1.tar.gz * installing to library '/usr/local/lib64/R/library' WARNING: omitting pointless dependence on 'R' without a version requirement * installing *source* package 'trimcluster' ... ERROR: a 'NAMESPACE' file is required * removing '/usr/local/lib64/R/library/trimcluster'
解決方案:
#解壓 tar -xzf trimcluster_0.1-1.tar.gz #寫入NameSpace cd trimcluster echo 'exportPattern( "." )' > NAMESPACE cd .. #打包 tar -zcf trimcluster.tar.gz trimcluster #再次安裝 R CMD INSTALL trimcluster.tar.gz
安裝成功!