Problem with installing Rtools: cannot locate the file in PATH - r

I'm trying to download the package "Seurat" in R, the package is installed and it's now in my list of packages.
** testing if installed package keeps a record of temporary installation path
* DONE (patchwork)
The downloaded source packages are in
‘C:\Users\parnian\AppData\Local\Temp\RtmpAVgSd8\downloaded_packages’
But when I try to call it (library(Seurat)) I get the following error:
> library(Seurat)
Error: package or namespace load failed for ‘Seurat’:
object ‘wrap_plots’ is not exported by 'namespace:patchwork'
I read the similar questions and manually installed "patchwork":
> install.packages("patchwork")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/parnian/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
R also tells me to install Rtools whhich I have, but when I follow these commands:
> writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")
but when I want to verify that make can be found (Sys.which("make")), I get this:
> Sys.which("make")
make
""
Also the downloaded packages of Seurat are saved in a location that doesn't even exist in my computer! How is that possible?
How can I fix this? Is there something wrong with the address I write for the path?
Thank you

Related

Unable to install XML package to Rstudio

I'm trying to install XML Package to Rstudio Using the ribbon: Tools--> Install Packages --> Packages: to type XML, but the dropdown list opend had only this packages : xml2, XML2R, xml2relational, xmlparsedata, xmlr, xmlrpc2.
Next, I tried:
install.packages("XML")
but received the warning:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘D:/BCDD/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘XML’ is not available (for R version 3.6.3)
So I followed the link above :https://cran.rstudio.com/bin/windows/Rtools/
and using these questions:
Why can't I install the XML package
Cannot install package XML to R
Then tried
install.packages("XML", repos = "http://www.omegahat.net/R",type="source")
but received the same warning and more:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘D:/BCDD/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://www.omegahat.net/R/src/contrib/XML_3.99-0.tar.gz'
Content type 'application/x-gzip' length 1547930 bytes (1.5 MB)
downloaded 1.5 MB
* installing *source* package 'XML' ...
** using staged installation
Please define LIB_XML (and LIB_ZLIB, LIB_ICONV)
ERROR: configuration failed for package 'XML'
* removing 'D:/BCDD/Documents/R/win-library/3.6/XML'
Warning in install.packages :
installation of package ‘XML’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\BCDD\AppData\Local\Temp\RtmpAhAYpl\downloaded_packages’
Any help to how to install the package XML will be appreciated
You can download the version you want from here: https://cran.rstudio.com//src/contrib/Archive/XML/
According to their GitHub repo, version 3.99-0.3 should work for you, I can't try it out coz I have R4.0 and I can install only the most recent [3.99-0.5].
Alternatively, when you choose the version you want and run on your R console:
devtools::install_version("XML", version = "3.99-0.3") # or the version you want
Have a try. Let me know.
Check this RStudio Support post which covers how to install older versions of packages.
Be sure to install rtools35 from the archive
Going to R 4.0.2 is not a particularly bad idea at this point.

Error: package or namespace load failed for ‘Seurat’?

I'm trying to download the package "Seurat" in R, the package is installed and it's now in my list of packages.
** testing if installed package keeps a record of temporary installation path
* DONE (patchwork)
The downloaded source packages are in
‘C:\Users\parnian\AppData\Local\Temp\RtmpAVgSd8\downloaded_packages’
But when I try to call it (library(Seurat)) I get the following error:
> library(Seurat)
Error: package or namespace load failed for ‘Seurat’:
object ‘wrap_plots’ is not exported by 'namespace:patchwork'
I read the similar questions and manually installed "patchwork":
> install.packages("patchwork")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/parnian/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
R also tells me to install Rtools whhich I have, but when I follow these commands:
> writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")
but when I want to verify that make can be found (Sys.which("make")), I get this:
> Sys.which("make")
make
""
Also my downloaded packages are saved in a location that doesn't even exist in my computer!
How can I fix this?
Thank you
when you finish
> writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")
you should restart R.
then Sys.which("make") may work.

Rstudio has been throwing errors since my attempt to install the devtools package [duplicate]

I've installed devtools for R, but when I call the library with:
library(devtools)
I get the following output:
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.1 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
So I executed the following code:
install.packages("Rtools", repos = "http://cran.r-project.org/bin/windows/Rtools/")
And I get the following output:
Installing package into ‘C:~/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://cran.r-project.org/bin/windows/Rtools/bin/windows/contrib/3.0
Warning message:
package ‘Rtools’ is not available (for R version 3.0.2)
I would appreciate any help that's out there to get Rtools onto my machine so I can call the devtools library. Thank you!
Rtools is not a package. See here: https://cran.r-project.org/bin/windows/Rtools/

How do I install Aspell package/library in Windows?

I would like to install Aspell package in R in Windows but there is no binary file available of Aspell package.
Please suggest some way around.
Following is the message i get on trying to install it.
> install.packages("Aspell", repos = "http://www.omegahat.org/R")
Installing package into ‘C:/Users/admin/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
package ‘Aspell’ is available as a source package but not as a binary
Warning message:
package ‘Aspell’ is not available (for R version 3.0.1)
It is said: "There is currently no binary version for Windows. Send mail to me if you would like one."
From
http://www.omegahat.org/Aspell/

How to install the fftw3 package of R in ubuntu 12.04?

I am trying to install the fftw3 package through R console
>install.packages("fftw")
After this command it is asking to select the cran mirror.I have selected the cran mirror then following error occurs:
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)
And When I am trying for fftw3 then following error occurs:
> 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 R version 2.14.1)
Can anyone help me out of this?
As Paul said, that's probably not an R package. There is an R package that is a wrapper for the FFTW library, also called fftw, you should install that:
Link to CRAN page of fftw
In Ubuntu you have then still the system requirement to have a proper installed fftw library, that you probably can solve via
sudo apt-get install fftw3 fftw3-dev pkg-config
The website you linked talks about a C library, there is nothing about an R code package. You mistakenly assume that R can install any .tar.gz file as an R library. An R library has a very specific structure of files and directories, and the error you get is because the .tar.gz does not adhere to this structure.

Resources