Rcplex error - is not a valid package - r

I am using R 3.1.3 and had installed Rcplex via tar.gz file at http://cran.at.r-project.org/web/packages/Rcplex/index.html
When I load the library I get following error:
library (Rcplex)
Error in library(Rcplex) : ‘Rcplex’ is not a valid installed package
EDIT:
The package was installed by extracting the contents of the tar.gz file where other libraries are stored /installed.
Also tried installing it through the source:
install.packages ("<file path>/Rcplex_0.3-2.tar.gz", repos=NULL,type="source")
In install.packages("("<file path>//Rcplex_0.3-2.tar.gz",: installation of package ‘("<file path>/Rcplex_0.3-2.tar.gz’ had non-zero exit status
Lastly, tried via CRAN url.
install.packages ("Rcplex", repos="http://cran.us.r-project.org",type="source")
Warning: unable to access index for repository http://cran.us.r-project.org/src/contrib
Warning message: package ‘Rcplex’ is not available (for R version 3.1.3)

Related

Installed Rtools, R says it is not installed

I've followed the instructions here to a T
https://cran.r-project.org/bin/windows/Rtools/
When I run the test on the jsonlite package I still get
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
and then
Error: ERROR: no permission to install to directory 'C:/Users/fl014036/Documents/R/R-3.6.2/library'
Warning in install.packages :
installation of package ‘jsonlite’ had non-zero exit status

rgl installation in Mac: X11 not found

I am having the same problem as this and this.
I have installed R and rstudio through a conda environment which included r-rgl. I am now trying to install a package within R that requires rgl. However, calling library(rgl) gives the error
Error: package or namespace load failed for ‘rgl’:
package ‘rgl’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
I have tried to install rgl from within R, but then I get this message:
checking for X... no
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ‘rgl’
* removing ‘/path/to/miniconda3/envs/my_conda_env/lib/R/library/rgl’
* restoring previous ‘/path/to/miniconda3/envs/my_conda_env/lib/R/library/rgl’
Warning in install.packages :
installation of package ‘rgl’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/vh/.../downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
The solution to the last error seems to be installing XQuartz in Mac, but I had it installed before. So I tried specifying install.packages("rgl", INSTALL_opts = "--with-libpng-prefix=/usr/X11/") but I still get the error above. Any suggestions? I'm quite lost now...
TL;DR: how do I connect my XQuartz installation with each conda environment that I create?

Is there any way to install RMongo package as its officially removed from CRAN?

I need to install RMongo to connect to my local MongoDB database. On installing RMongo I am getting this error:
Warning in install.packages :
package ‘RMongo’ is not available (for R version 3.5.3)
I also downloaded RMongo tar file and stored in R directory where all packages get installed and tried to install the package by writing this command in R environment
install.packages("C:/Users/Akash/Documents/R/win-library/3.5/RMongo_0.0.25.tar", repos = NULL, type="source")
On trying to download the package through tar file I am getting this error,
Warning: invalid package 'C:/Users/Akash/Documents/R/win-library/3.5/RMongo_0.0.25.tar'
Error: ERROR: no packages specified
In R CMD INSTALL
Warning in install.packages :
installation of package ‘C:/Users/Akash/Documents/R/win-library/3.5/RMongo_0.0.25.tar’ had non-zero exit status
Any help is appreciated
Thanks in Advance

How can I install source R packages from a local CRAN and binary for its dependencies?

I have a package which I wrote that is deployed on a local CRAN. I built the tgz with R CMD build and deployed it to a local cran initialised with miniCRAN. Of course, this package is deployed by miniCRAN as source.
Now, in a packrat environment I have to install this package and its dependencies, but the dependencies come from CRAN. I do
> install.packages("mypackage", repos=c("file:///path/to/my/localCRAN", "https://mran.microsoft.com/snapshot/2018-08-01"), type="source")
However, this forces every package to build as source, and this fails because I don't have stuff to compile, say, dplyr or other stuff. I want to download the binaries for those.
If I issue instead
> install.packages("mypackage", repos=c("file:///path/to/my/localCRAN", "https://mran.microsoft.com/snapshot/2018-08-01"))
then install.packages tries to install also my package as binary and stops first with this error
Error in read.dcf(file = tmpf) : cannot open the connection
In addition: Warning message:
In read.dcf(file = tmpf) :
cannot open compressed file '/Users/username/my/localCRAN/bin/macosx/el-capitan/contrib/3.5/PACKAGES', probable reason 'No such file or directory'
So I created an empty PACKAGES file at that path, and now it fails with the following error
package ‘mypackage’ is available as a source package but not as a binary
Warning message:
package ‘mypackage’ is not available (as a binary package for R version 3.5.3)
How can I install my package as source, and its CRAN dependencies as binary?

Error installing R package - Kernsmooth

I am getting error while installing package KernSmooth. How can I install this pacakge ?
Getting warning messages on not able to access index for repository and one with package not available. Below are example warning message-
Warning: unable to access index for repository
http://lib.stat.cmu.edu/R/CRAN/src/contrib Warning message: package
‘KernSmooth’ is not available (for R version 3.2.1)

Resources