Tidyverse not installing - r

I'm having a bit of a pickle right now with the package tidyverse, that I need for an assignment on layering maps. I tried installing the package using install.packages("tidyverse") and install.packages ("tidyverse", dependencies = TRUE) but when I ran library(tidyverse) it wasn't installed. I searched online and found that I had an older version of RStudio IDE so I uploaded the latest version (1.3.1056).
After installing the newest version, I reinstalled the package but R tells me the following:
"Rtools is required to build R packages but is not currently
installed".
So, I did it, but the R tells me Rtools package is not available for R version 3.5.3.
What can I do to use tidyverse?

It could be a permissions issue, try setting the directory for where you install R packages/libraries on your computer using libpaths. I have to do this on my work laptop because the university has it set up to store things like this in a tempporary directory on the remote server which isn't desirable.
.libPaths("C:/R")
.libPaths()

Related

R - Installing package with remotes::install_github ask for higher version of the dependencies which BiocManager::install() can not find

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.

Installing local binary packages using R CMD INSTALL on a Mac

I came across a package that is not available on CRAN. I tried to install the package using:
Packages & Data > Package Installer > Local Binary Package > At User
Level > [FileName.tgz] > Install...
This didn't work and I am now trying to use the R CMD INSTALL command. However, it seems I need to run that command in the command line interface but I cannot get it to install properly.
The package I'm trying to install is called gEcon. It can be found here. In particular, I am getting the following error message after "installing" the package:
Error: package or namespace load failed for ‘gEcon’:
package ‘gEcon’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
I assume it's the way I'm installing it.
Thanks in advance.
You're going to need to install Xcode apparently, because you've got to install this from source per these directions:
Now, you've gotta update R to the latest stable release, or if you prefer you can find the exact minimum newest version needed for gEcon.
After upgrading R you can complete the installation from source.
Original answer to original question:
Two things:
To access the command line and use R CMD on an Apple computer, please use the terminal.app app. Please see this for more details.
An easier and probably better approach is to install your package from the author's Github (or BitBucket, etc) repository using devtools::install_github or just use devtools::install on the downloaded source project.

R package was installed by version with different internals

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()

I am trying to install package manipulate : message = not available for r 3.1.1

windows 7 -pro
r studio 0.98.945
r 3.1.1
I am trying to install manipulate:
install.packages("manipulate").
Warning in install.packages :
package ‘manipulate’ is not available (for R version 3.1.1)
is this package not available or is something wrong in my machine or how to get it ?
thanks for all update/help
best regards, Guy Przytula
It's not on CRAN. It's usually installed as part of the RStudio install process. I'd suggest to re-install RStudio.
Another possibility is offered by the RStudio support:
1.) The easiest workaround is to just install the package manually from its location in Program Files - you can zip up the C:\Program
Files\RStudio\R\library\manipulate folder and install it using
install.packages() - this will get the manipulate package installed
and running.
If that doesn't solve your issues, you should post at the RStudio support forum.

Error while installing R package: package built for universal-apple-darwin

I installed a R package as suggested by How do I install an R package from source?, using R CMD INSTALL [my_pkg_path.tgz]. Package sources are downloaded from r-project.org, e.g., http://cran.r-project.org/web/packages/fields/index.html
However, when I try to load the package using say library(fields), I got the error that complains the package are built for universal-apple-darwin:
Error: package ‘fields’ was built for universal-apple-darwin9.8.0
Guess it's something to do with architecture, but no idea how to resolve it. Any idea? Thanks.
It looks like you downloaded the package's Mac OSX binary file, which usually ends in .tgz - try downloading the package source (usually something ending in .tar.gz) and installing the package again.
Depending on what your operating system is, you may need an additional set of software before you can install packages from source. If the above suggestion doesn't work, would you provide some information about the OS, for example from sessionInfo()?

Resources