R library(qdap) installation error - r

I am having difficulty installing the qdap library, see below:
I installed the Java library first, and then the qdap library:
Sys.setenv(JAVA_HOME='C:\Program Files (x86)\Java\jre7')
library(rJava)
then the devtools library:
library(devtools)
install_github("trinker/qdapDictionaries")
install_github("trinker/qdapRegex")
install_github("trinker/qdapTools")
install_github("trinker/qdap")
The other installations before qdap go fine, but at qdap this error is generated:
install_github("trinker/qdap")
Downloading github repo trinker/qdap#master
Installing qdap
Skipping 3 packages ahead of CRAN: qdapDictionaries, qdapRegex, qdapTools
"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \
CMD INSTALL \
"C:/Users/Seema/AppData/Local/Temp/RtmpMdVHCQ/devtools101432a84788/trinker-qdap-85cbe87" \
--library="C:/Users/Seema/Documents/R/win-library/3.2" --install-tests
installing source package 'qdap' ...
** R
** data
*** moving datasets to lazyload DB
** inst
** tests
** preparing package for lazy loading
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries
Error: Command failed (1)
What dependent libraries is it looking for? Any help highly appreciated.

Related

How to exclude package in R from downloading automatically?

I am trying to download the GGMAP package in R. during installation, it also downloads ggplot 2.1.0. I am getting an error, however, that the ggplot version required by ggmap is 2.2.0. How do I force ggplot to be the latest version?
> library(devtools)
> install_github("dkahle/ggmap")
Downloading GitHub repo dkahle/ggmap#master
from URL https://api.github.com/repos/dkahle/ggmap/zipball/master
Installing ggmap
"C:/PROGRA~1/MIE74D~1/RCLIEN~1/R_SERVER/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/dixi/AppData/Local/Temp/RtmpuYriTy/devtools2604499b1ebd/dkahle-ggmap-065fe6a" \
--library="C:/Users/dixi/Documents/R/win-library/3.3" --install-tests
* installing *source* package 'ggmap' ...
** R
** data
*** moving datasets to lazyload DB
** inst
** tests
** preparing package for lazy loading
Error : package 'ggplot2' 2.1.0 was found, but >= 2.2.0 is required by 'ggmap'
ERROR: lazy loading failed for package 'ggmap'
* removing 'C:/Users/dixi/Documents/R/win-library/3.3/ggmap'
* restoring previous 'C:/Users/dixi/Documents/R/win-library/3.3/ggmap'
Error: Command failed (1)

I'm having some trouble to install the tscompdata package in my r

I'm trying to install the tscompdata package to R. This is a new one.
The installation is by the "devtools" package, using the following command:
devtools::install_github("robjhyndman/tscompdata")
and the output is:
Downloading GitHub repo robjhyndman/tscompdata#master from URL
https://api.github.com/repos/robjhyndman/tscompdata/zipball/master
Installing tscompdata '/usr/lib/R/bin/R' --no-site-file --no-environ
--no-save --no-restore --quiet CMD INSTALL \ '/tmp/RtmpjrsG7p/devtools45d14034ea55/robjhyndman-tscompdata-0329cec'
\ --library='/home/diego/R/x86_64-pc-linux-gnu-library/3.4'
--install-tests
* installing *source* package ‘tscompdata’ ...
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading Error : object ‘mstl’ is not exported by 'namespace:forecast' ERROR: lazy loading
failed for package ‘tscompdata’
* removing ‘/home/diego/R/x86_64-pc-linux-gnu-library/3.4/tscompdata’ Installation failed: Command failed (1)
did someone face this problem too?

Installing package "icd9" in R from Github with Rtools ERROR

I'm trying to install package "icd9" from Github repository.
First I've installed devtools package.
Then
devtools::install_github("jackwasey/icd9")
After this line I have following report:
Downloading GitHub repo jackwasey/icd9#master
Installing icd9
"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore CMD INSTALL \
"C:/Users/rubal/AppData/Local/Temp/RtmpEHgKOa/devtools1fd4455976bc/jackwasey-
icd9-ad36b5b" \
--library="C:/Users/rubal/Documents/R/win-library/3.2" --install-tests
* installing *source* package 'icd9' ...
Предупреждение: работающая команда 'sh ./configure.win' имеет статус 127
ERROR: configuration failed for package 'icd9'
* removing 'C:/Users/rubal/Documents/R/win-library/3.2/icd9'
Error: Command failed (1)
What I do wrong? How could I install this package?
Latecomer to this question, but as I'm the author of the said package, I should let you know that 'icd9' is deprecated. Now all ICD-9 and ICD-10 functions are contained in the much slicker, much faster icd package on CRAN.

No vignettes found by browseVignettes where they actually are there

I have a package on a github repository with 2 vignettes in the vignettes/ directory.
I tried to download if with devtools package like this
> if (!require(devtools)) {
+ install.packages("devtools")
+ require(devtools)
+ }
> install_github("MarcinKosinski/RTCGA", build_vignettes=TRUE)
Downloading github repo MarcinKosinski/RTCGA#master
Installing RTCGA
"D:/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/Marcin/AppData/Local/Temp/Rtmpg1Kbfy/devtools3cf47f1f6731/MarcinKosinski-RTCGA-0d91d7c" \
--library="C:/Users/Marcin/Documents/R/win-library/3.2" --install-tests
* installing *source* package 'RTCGA' ...
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (RTCGA)
Reloading installed RTCGA
Welcome to the RTCGA (version: 0.99.6).
but when I try to browse Vignettes it appears they were not build.
> library(RTCGA)
> browseVignettes("RTCGA")
No vignettes found by browseVignettes("RTCGA")
I've seen some old issue where people suggested to use build_vignettes=TRUE, but as you see it didn't help OR to add move Vignettes to remove inst/doc/ directory from .Rbuildignore file. But this must be and old issue, because I haven't seen such directory in a binary source after installation of the package.
I've also seen this answer on a similar question, but when I built source and then install package from a source it appears to have the same issue: No vignettes found by browseVignettes("RTCGA").
Any idea on how to make this work?
EDIT
According to Martin's answer
I've addedthis fragment of code to vignettes' YAML
vignette: >
%\VignetteIndexEntry{Integrating TCGA Data - RTCGA Tutorial}
%\VignetteEngine{knitr::rmarkdown}
I've edited YAML of 2 of my vignettes
I've added code to the beggining of YAML - this file
Just in case I once added new information to the end of YAML - this file
but still there appears there are no vignettes available after installation from github
> devtools::install_github("MarcinKosinski/RTCGA")
Downloading github repo MarcinKosinski/RTCGA#master
Installing RTCGA
'/usr/lib/R/bin/R' --vanilla CMD INSTALL \
'/tmp/Rtmpk34Zbr/devtools531845716f54/MarcinKosinski-RTCGA-5571117' \
--library='/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2' --install-tests
* installing *source* package ‘RTCGA’ ...
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (RTCGA)
> library(RTCGA)
Welcome to the RTCGA (version: 0.99.6).
> browseVignettes("RTCGA")
No vignettes found by browseVignettes("RTCGA")
EDIT 2
Of course I've forgoten to add parameter buildVignettes = TRUE but after this it looks like vignettes are seen but there is some problem with their compilation during build:
devtools::install_github("MarcinKosinski/RTCGA", build_vignettes=TRUE)
Downloading github repo MarcinKosinski/RTCGA#master
Installing RTCGA
'/usr/lib/R/bin/R' --vanilla CMD build \
'/tmp/RtmpA7il1Q/devtools5fc871b48f57/MarcinKosinski-RTCGA-e47bdf6' \
--no-resave-data --no-manual
* checking for file ‘/tmp/RtmpA7il1Q/devtools5fc871b48f57/MarcinKosinski-RTCGA-e47bdf6/DESCRIPTION’ ... OK
* preparing ‘RTCGA’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
Removed empty directory ‘RTCGA/ghPage’
Removed empty directory ‘RTCGA/inst’
* building ‘RTCGA_0.99.6.tar.gz’
'/usr/lib/R/bin/R' --vanilla CMD INSTALL \
'/tmp/RtmpA7il1Q/RTCGA_0.99.6.tar.gz' \
--library='/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2' \
--install-tests
* installing *source* package ‘RTCGA’ ...
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
Warning in file(con, "w") :
cannot open file '/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2/RTCGA/doc/index.html': No such file or directory
Error in file(con, "w") : cannot open the connection
ERROR: installing vignettes failed
* removing ‘/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2/RTCGA’
* restoring previous ‘/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2/RTCGA’
Error: Command failed (1)
From Writing R Extensions, section 1.4.2, your vignettes need to have a line
%\VignetteEngine{knitr::knitr}
in them; a common paradigm is to add the following to the yaml at the top of the vignette
vignette: >
%\VignetteIndexEntry{Integrating TCGA Data}
%\VignetteEngine{knitr::rmarkdown}
VignetteIndexEntry provides a convenient title for R's help system. Remember the BiocStyle package for creating vignettes with a consistent look.
I only could solve this, using:
devtools::build_vignettes()
Of course, then uploading the new files by git

ERROR: a 'NAMESPACE' file is required

I am trying to install some R packages on a Linux machine using
R CMD INSTALL -l <ourRlibrarylocation> <path where I saved the packagename.tar.gz file>
and I see an error message:
ERROR: a 'NAMESPACE' file is required
I am using R 3.0.1. Please help, I am new to R and just downloaded these packages for customers.
One example:
R CMD INSTALL -l /abcde/R/R-3.0.0/library /home/RFILES/PKG/UScensus2000tract_0.03.tar.gz
* installing *source* package âUScensus2000tractâ ...
ERROR: a 'NAMESPACE' file is required
* removing â/abcde/R/R-3.0.0/library/UScensus2000tractâ
According to the R documentation for writing extensions, all packages destined for version 3.0.0 and later must contain a NAMESPACE file. If you download an R package that gives you the above error, here's what you should try:
Untar the package:
tar -xvf the_package.tar.gz
Add a NAMESPACE file with the line exportPattern( "." ):
cd the_package
echo 'exportPattern( "." )' > NAMESPACE
cd ..
Re-tar the package:
tar -zcf the_package.tar.gz the_package
Try and install it again.
Hope that helps.
I actually just hit the same thing when compiling R-3.0.1. It looks to be that the package version that I was using was out of date. This was for proto:
# /var/local/R-3.0.1/bin/R CMD INSTALL -l /var/local/R-3.0.1/lib64/R/library proto_0.3-9.2.tar.gz
* installing *source* package ‘proto’ ...
ERROR: a 'NAMESPACE' file is required
* removing ‘/var/local/R-3.0.1/lib64/R/library/proto’
But there was a newer version for proto (0.3-10) which worked fine:
# ../var/local/R-3.0.1/bin/R CMD INSTALL -l ../var/local/R-3.0.1/lib64/R/library proto_0.3-10.tar.gz
* installing *source* package ‘proto’ ...
** package ‘proto’ successfully unpacked and MD5 sums checked
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
‘proto.Rnw’
‘protoref.Rnw’
** testing if installed package can be loaded
* DONE (proto)
I had an older install of R (2.15), which the older proto package worked with:
# /var/local/R-2.15.0/bin/R CMD INSTALL -l /var/local/R-2.15.0/lib64/R/library proto_0.3-9.2.tar.gz
* installing *source* package 'proto' ...
** Creating default NAMESPACE file
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
'proto.Rnw'
'protoref.Rnw'
** testing if installed package can be loaded
It looks like the older version of R actually creates the missing NAMESPACE file, but the new version bails. Hope this helps you!
I found the following link more useful:
How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
6. The package is out of date
It may have been archived (if it is no longer maintained and no longer passes R CMD check tests).
In this case, you can load an old version of the package using install_version()
library(devtools)
install_version("foobarbaz", "0.1.2")
An alternative is to install from the github CRAN mirror.
library(devtools)
install_github("cran/foobarbaz")
One can now use remotes::install_url() or remotes::install_local().
It installs dependencies and generates the NAMESPACE file automatically.

Resources