I'm writing an R package for simulations using Rcpp. Rcpp project setup has added my Rcpp version as dependendy Rcpp (>= 1.0.9)
A project partner who is trying to run the simulations has Rcpp version 1.0.8. I did not see anything in the release notes of Rcpp 1.0.9 that would suggest, that the package wouldn't build on version 1.0.8 but I would want to try to build it before changing the dependency.
Would the following work to test this:
install Rcpp 1.0.8 from the CRAN archive to a local library
add the local library as first entry to library paths with .libPaths
call devtools::build
Related
One of my R packages (pkgfilecache) on CRAN is not available for R 3.4 under Windows, and I would like to change that.
The package passed all CRAN checks and seems to work under Windows with R 3.4. (I do not have a Windows machine, but I think so because the package passes all unit tests on Appveyor for that platform and R version). But apparently it was simply not built/published for Windows and R 3.4 by CRAN.
My questions are:
Is there any way for me to trigger a Windows build for that version on CRAN, so that my package becomes available?
How can I find out why it was not built?
I need to install few packages that should be installed with remotes::install_github() like
"acidgenomics/basejump" or "satijalab/seurat".
During the installation, it need to upgrade few other packages version. The BiocManager::install program cannot find those versions and I had to install those dependencies packages version with:
R CMD INSTALL IRanges_2.20.2.tar.gz
Then other packages, that use the same packages stop working. like DESeq2,
I get the error:
Error: package or namespace load failed for ‘DESeq2’:
objects ‘rowSums’, ‘colSums’, ‘rowMeans’, ‘colMeans’ are not exported by 'namespace:S4Vectors'
I found few answers that say it happen (like url)
remotes::install_github() isn't picking up the correct Bioconductor
devel repos, whereas installing with BiocManager::install() does work
as expected.
we have the R 3.6.0 installed as a module and a lot of users uses the same R version. I need all packages to work for everyone.
How can I make all variety packages versions to work?
Finally, I install new version of R 3.6.3 with Bioconductor 3.10 and all the packages install right.
I just upgraded to R 3.5.1 and upon issuing the command library(tidyverse) I keep getting R Studio asking me to install each tidyverse application individually.
library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
package ‘Rcpp’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Once I installed (for example) Rcpp it the console then warns me I need to install glue yaml tibble tidyselect purr and every app under the sun.
If I `install.packages("tidyverse") it just says the same error shown above, "package ‘XYZ’ was installed by an R version with different ".
Where can I find the full list of packages to install so I can just issue one command install.packages(c("yaml", "Rcpp", "glue", "tidyselect", etc etc)?
On my Win 7 Ent x64 I installed RStudio R-3.4.2.
I installed few packages that I need (RPostgreSQL, sqldf, etc..)
But when I'm executing code, these libraries give me errors:
library(RPostgreSQL)
Error: package ‘RPostgreSQL’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
In addition: Warning message:
package ‘RPostgreSQL’ was built under R version 3.5.0
All of the packages are downloaded from CRAN. RPostgrSQL is 0.6-2 version.
I'm pretty sure that solution is quite simple, but I searched a lot and still cannot find the solution.
How did you install the package RPostgreSQL? If you used
install.packages("RPostgreSQL") on your Windows it installed using binaries, which may have been built using a different R version. In your case, 3.5.0 vs 3.4.2.
Try using install.packages("RPostgreSQL", type="source"). This way your machine will compile the package from source using your version of R, and it should work.
If the package needs C/C++/Fortran compilation, you will als need RTools installed on your machine.
You can try to find all packages installed with the old version R like this:
grep 'Built: R 3.4' /usr/local/lib/R/site-library/*/DESCRIPTION > temp
and then you can uninstall the packages with remove.packages()
Installing Rcpp on Linux Ubuntu 12.04, with R2.15.2
NB both R and rcpp were installed yesterday; so I would expect the most recent versions, but Rcpp is installed as an out of date version!
> old.packages()
Package LibPath Installed Built ReposVer
Rcpp "Rcpp" "/usr/lib/R/site-library" "0.9.9" "2.14.1" "0.10.2"
rgl "rgl" "/usr/lib/R/site-library" "0.92.798" "2.12.1" "0.92.894"
Repository
Rcpp "http://www.stats.bris.ac.uk/R/src/contrib"
rgl "http://www.stats.bris.ac.uk/R/src/contrib"
> update.packages("Rcpp")
As the last line shows, it has not updated the package Rcpp at all; What is causing this and what can I do to resolve this?
NB Tried re-installing from two different repositories, both of which claimed to have the most recent version 0.10.2 of rcpp.
Regards
Jefe
You simply misunderstand.
The Rcpp you have is from Ubuntu and installed via apt-get et al. That version is frozen when the distro freezes. This is similar to how gcc, emacs, ... are not the most current version available now but the version taken when the distro was made.
And as an aside, even that Ubuntu version is now dated by one release as 12.10 is out...
So your question title is wrong. The version you have is installed correctly as the version that is part of Ubuntu 12.04. Makes sense now?
Now, if you install Rcpp from CRAN via install.packages() you will get the current version, idem for rgl.
(And there is also a PPA on launchpad which likely to have both as prebuild .deb packages.)
Lastly, and explained before, the path /usr/lib/R/site-library is for the r-cran-* packages you install as .deb files where /usr/local/lib/R/site-library is for your local
installs from R itself. Because of that split, the output of old.packages() that is driven from the former path, eg /usr/lib/R/site-library is bound to behind because it is managed by the distribution, here Ubuntu. You chose the distro for the stability of its components -- and you are free to augment it with CRAN packages in /usr/local/lib/R/site-library. And that is definitely a feature.
Witness this from my Ubuntu box:
R> old.packages(lib.loc="/usr/local/lib/R/site-library/")
NULL
R>