Error in installing *install.packages("tstools")* in language R - r

I am getting some error while installing package tstools.
Several other packages were installed correctly like(xts, forecast, MAPA, openxslx),
but this one causing trouble.
R version: 3.5.0
RStudio version: 1.1.447
CRAN: Indonesia
OS: windows 10
Here is the error log...
> install.packages("tstools")
Installing package into ‘C:/Users/pc_name/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘data.table’
There is a binary version available but the source version is later:
binary source needs_compilation
tstools 0.3.6 0.3.6.1 FALSE
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘data.table’
These will not be installed
installing the source package ‘tstools’
trying URL 'https://cran.rstudio.com/src/contrib/tstools_0.3.6.1.tar.gz'
Content type 'application/x-gzip' length 960748 bytes (938 KB)
downloaded 938 KB
ERROR: dependency 'data.table' is not available for package 'tstools'
* removing 'C:/Users/pc_name/Documents/R/win-library/3.5/tstools'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘tstools’ had non-zero exit status
The downloaded source packages are in ‘C:\Users\pc_name\AppData\Local\Temp\Rtmp6l4hr7\downloaded_packages’

Have you tried using devtools?
install.packages("devtools")
devtools::install_github("trnnick/TStools")
Sometimes bioconductor also does the trick
source("https://bioconductor.org/biocLite.R")
biocLite("tstools")

Have you tried install.packages("tstools", dependencies = T) ?

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.

Install R package gplots for R version 3.4.4?

I am trying to install 'gplots' in R 3.4.4, however I keep getting the following error:
install.packages("gplots")
Installing package into ‘/home/u1983390/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning: dependency ‘caTools’ is not available
trying URL 'https://cloud.r-project.org/src/contrib/gplots_3.0.3.tar.gz'
Content type 'application/x-gzip' length 516153 bytes (504 KB)
==================================================
downloaded 504 KB
ERROR: dependency ‘caTools’ is not available for package ‘gplots’
* removing ‘/home/u1983390/R/x86_64-pc-linux-gnu-library/3.4/gplots’
The downloaded source packages are in
‘/tmp/Rtmplw9pSu/downloaded_packages’
Warning message:
In install.packages("gplots") :
installation of package ‘gplots’ had non-zero exit status
> install.packages('caTools')
Installing package into ‘/home/u1983390/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning message:
package ‘caTools’ is not available (for R version 3.4.4)
I believe this can be solved by installing a version of caTools compatible with R 3.4.4 following this method. However, I cannot find where older versions of caTools are (I have looked in the CRAN archive).
Would anybody be able to direct me to an earlier version, or does anyone know a different method for instaling gplots?
Cheers,
Jamie

Issue in installing devtools in R version 4.0

After updating the R version from 3.5 to 4.0 I am facing installation issues with devtools package.
Having Rtools 4.0 and RStudio-1.2.5042 downloaded and installed.
when I try to install devtools
install.packages("devtools")
I get this message:
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/shalzsab/Documents/R/win-library/4.0’ (as ‘lib’ is
unspecified) also installing the dependency ‘usethis’
There is a binary version available but the source version is later:
binary source needs_compilation usethis 1.6.0 1.6.1 FALSE
trying URL
'https://cran.rstudio.com/bin/windows/contrib/4.0/devtools_2.3.0.zip'
Content type 'application/zip' length 351089 bytes (342 KB) downloaded
342 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\shalzsab\AppData\Local\Temp\RtmpkhJwos\downloaded_packages
installing the source package ‘usethis’
trying URL 'https://cran.rstudio.com/src/contrib/usethis_1.6.1.tar.gz'
Content type 'application/x-gzip' length 255052 bytes (249 KB)
downloaded 249 KB
The downloaded source packages are in
‘C:\Users\shalzsab\AppData\Local\Temp\RtmpkhJwos\downloaded_packages’
And when I load the package I get this error
library(devtools)
Error: package ‘usethis’ required by ‘devtools’ could not be found
If I try to check the packages in the installation directory
find.package("devtools")
"C:/Users/shalzsab/Documents/R/win-library/4.0/devtools"
For usethis package I get this error
find.package("usethis")
Error in find.package("usethis") : there is no package called ‘usethis’
How can I solve this?

Error while installing RSelenium in R

I am getting following error when I try to install the RSelenium package.
install.packages("RSelenium")
Installing package into ‘C:/Users/nshukla/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘binman’ is not available
also installing the dependencies ‘subprocess’, ‘semver’, ‘wdman’
There is a binary version available but the source version is later:
binary source needs_compilation
RSelenium 1.6.2 1.7.1 FALSE
Packages which are only available in source form, and may need compilation of C/C++/Fortran:
‘subprocess’ ‘semver’
These will not be installed
installing the source packages ‘wdman’, ‘RSelenium’
trying URL 'https://cran.rstudio.com/src/contrib/wdman_0.2.2.tar.gz'
Content type 'application/x-gzip' length 26342 bytes (25 KB)
downloaded 25 KB
trying URL 'https://cran.rstudio.com/src/contrib/RSelenium_1.7.1.tar.gz'
Content type 'application/x-gzip' length 4303990 bytes (4.1 MB)
downloaded 4.1 MB
ERROR: dependencies 'binman', 'subprocess', 'semver' are not available
for package 'wdman'
* removing 'C:/Users/nshukla/Documents/R/win-library/3.2/wdman'
Warning in install.packages : running command
'"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" CMD INSTALL -1
"C:\Users\nshukla\Documents\R\win-library\3.2"
C:\Users\nshukla\AppData\Local\Temp\RtmpuAuA2g/downloaded_packages/wdman_0.2.2.tar.gz'
had status 1
Warning in install.packages : installation of package
‘wdman’ had non-zero exit status ERROR: dependencies 'wdman', 'binman'
are not available for package 'RSelenium'
* removing 'C:/Users/nshukla/Documents/R/win-library/3.2/RSelenium'
Warning in install.packages : running command
'"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" CMD INSTALL -l
"C:\Users\nshukla\Documents\R\win-library\3.2"
C:\Users\nshukla\AppData\Local\Temp\RtmpuAuA2g/downloaded_packages/RSelenium_1.7.1.tar.gz'
had status 1
Warning in install.packages : installation of package
‘RSelenium’ had non-zero exit status
The binman package imports semver to parse semantic version strings. This depends on C++11. A version of R >= 3.3.0 is needed to install this. You would need to upgrade your version of R.
This worked for me:
install.packages('RSelenium', type="win.binary")
You could do this:
library(devtools)
install_version("binman", version = "0.1.0", repos = "https://cran.uni-muenster.de/")
install_version("wdman", version = "0.2.2", repos = "https://cran.uni-muenster.de/")
install_version("RSelenium", version = "1.7.1", repos = "https://cran.uni-muenster.de/")
This is the answer of FabianFox on the github page: https://github.com/ropensci/RSelenium/issues/172

Install package "rio" because of feather

I try in R to install the CRAN-packages "rio" but receive the following error:
install.packages("rio", dependencies = TRUE)
Installing package into ‘C:/software/Rpackages’
(as ‘lib’ is unspecified)
also installing the dependency ‘feather’
There is a binary version available but the source
version is later:
binary source needs_compilation
rio 0.4.0 0.4.8 FALSE
Package which is only available in source form, and may
need compilation of C/C++/Fortran: ‘feather’
These will not be installed
installing the source package ‘rio’
trying URL 'https://cran.rstudio.com/src/contrib/rio_0.4.8.tar.gz'
Content type 'application/x-gzip' length 40366 bytes (39 KB)
downloaded 39 KB
ERROR: dependency 'feather' is not available for package 'rio'
* removing 'C:/software/Rpackages/rio'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.4RE/bin/x64/R" CMD INSTALL -l "C:\software\Rpackages" C:\Users\BJRNAU~1\AppData\Local\Temp\Rtmp6rf71B/downloaded_packages/rio_0.4.8.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rio’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\BjørnAugust\AppData\Local\Temp\Rtmp6rf71B\downloaded_packages’
Can anyone help me install the packages?
This was an unintended consequence of importing feather in the latest release of rio. It will be correctly soon in the next release of rio to CRAN (v0.4.11), which should be available by 10 August 2016. In the meantime, you have a couple of options.
1) Install the development version from GitHub using something like:
devtools::install_github("leeper/rio")
# or
remotes::install_github("leeper/rio")
This version (v0.4.11) makes feather optional, so it is installable on older Windows versions.
2) Install an older version of rio:
packageurl <- "https://cran.r-project.org/src/contrib/Archive/rio/rio_0.4.6.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
But note that this will potentially require manual install of package dependencies.
3) Upgrade to the latest version of R (v3.3.1) so that you can install feather (and thus rio).

Resources