我正在尝试安装package mvoutlier但在安装过程中发生以下错误:
install.packages("mvoutlier")
configure: error: missing required header GL/gl.h
ERROR: configuration failed for package ‘rgl’
* removing ‘/home/sam/R/x86_64-pc-linux-gnu-library /2.15/rgl’
ERROR: dependency ‘rgl’ is not available for package ‘compositions’
* removing ‘/home/sam/R/x86_64-pc-linux-gnu-library/2.15/compositions’
ERROR: dependency ‘compositions’ is not available for package ‘mvoutlier’
* removing ‘/home/sam/R/x86_64-pc-linux-gnu-library/2.15/mvoutlier’
Run Code Online (Sandbox Code Playgroud)
之后我成功安装了rgl包,然后我尝试安装组合包然后再次发生同样的错误.然后我再次尝试安装mvoutlier包同样的错误发生.
任何人都可以让我知道如何解决这个问题.提前感谢你.
我试图通过R控制台安装fftw3包
>install.packages("fftw")
Run Code Online (Sandbox Code Playgroud)
在此命令之后,它要求选择镜面镜.我选择了镜面镜,然后发生以下错误:
Loading Tcl/Tk interface ... done
Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/src/contrib
Warning messages:
1: In open.connection(con, "r") :
unable to connect to 'cran.r-project.org' on port 80.
2: In getDependencies(pkgs, dependencies, available, lib) :
package ‘fftw’ is not available (for R version 2.14.1)
Run Code Online (Sandbox Code Playgroud)
当我尝试fftw3然后发生以下错误:
> install.packages("fftw3")
Installing package(s) into ‘/root/R/x86_64-pc-linux-gnu-library/2.14’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/src/contrib
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘fftw3’ is not available (for …Run Code Online (Sandbox Code Playgroud) 我尝试了以下代码进行安装
>install.packages("forecast")
Run Code Online (Sandbox Code Playgroud)
错误发生如下:
ERROR: dependency ‘Rcpp’ is not available for package ‘RcppArmadillo’
* removing ‘/root/R/x86_64-pc-linux-gnu-library/2.14/RcppArmadillo’
ERROR: dependencies ‘Rcpp’, ‘RcppArmadillo’ are not available for package ‘forecast’
* removing ‘/root/R/x86_64-pc-linux-gnu-library/2.14/forecast’
The downloaded packages are in
‘/tmp/RtmpJqQfrh/downloaded_packages’
Warning messages:
1: In install.packages("forecast") :
installation of package ‘RcppArmadillo’ had non-zero exit status
2: In install.packages("forecast") :
installation of package ‘forecast’ had non-zero exit status
Run Code Online (Sandbox Code Playgroud) 我是R语言的新手.我遇到了需要在向量中的备用位置填充零的情况.例如:
v<-c(1,2,3,4,5,6,7,8,9,10)
Run Code Online (Sandbox Code Playgroud)
我需要新的矢量
0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10
Run Code Online (Sandbox Code Playgroud)
我尝试使用for循环填充零但我无法做到.