Trouble installing glmmadmb in R - r

I am having trouble installing glmmADMB package and hoping to get some help here. I've talked to people I know who uses R but we couldn't figure this out.
Looks like the error is about a symbol in the directory. However, the ' is included as a default naming convention in Windows and I can't seem to change the folder name. I name my computer Vanessa and it automatically give the user folder name "Vanessa's PC". [It might not due to this error, since I have ran some other codes that included this symbol in the command.] Any suggestions or thoughts would be greatly appreciated.
This is the log I got:
install.packages("glmmADMB",
+ repos=c("http://glmmadmb.r-forge.r-project.org/repos",
+ getOption("repos")),
+ type="source")
Installing package into ‘C:/Users/Vanessa's PC/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'http://glmmadmb.r-forge.r-project.org/repos/src/contrib/glmmADMB_0.8.3.3.tar.gz'
Content type 'application/x-gzip' length 9391177 bytes (9.0 MB)
downloaded 9.0 MB
installing source package 'glmmADMB' ...
** R
** data
* moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Warning: package 'MASS' was built under R version 3.4.4
** help
* installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* arch - i386
Error: unexpected symbol in "tools:::.test_load_package('glmmADMB', 'C:/Users/Vanessa's"
Execution halted
* arch - x64
Error: unexpected symbol in "tools:::.test_load_package('glmmADMB', 'C:/Users/Vanessa's"
Execution halted
ERROR: loading failed for 'i386', 'x64'
removing 'C:/Users/Vanessa's PC/Documents/R/win-library/3.4/glmmADMB'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\Vanessa's PC\Documents\R\win-library\3.4" C:\Users\VANESSA'S~1\AppData\Local\Temp\Rtmp2piXfe/downloaded_packages/glmmADMB_0.8.3.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘glmmADMB’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Vanessa's PC\AppData\Local\Temp\Rtmp2piXfe\downloaded_packages’

Try installing the devtools package first and then installing glmmADMB directly from the development version on GitHub:
> library(devtools)
> devtools::install_github("bbolker/glmmadmb")
Downloading GitHub repo bbolker/glmmadmb#master
from URL https://api.github.com/repos/bbolker/glmmadmb/zipball/master
Installing glmmADMB
Installing 1 package: R2admb
Installing package into ‘C:/Users/User/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/R2admb_0.7.16.zip'
Content type 'application/zip' length 505317 bytes (493 KB)
downloaded 493 KB
package ‘R2admb’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\User\AppData\Local\Temp\Rtmp4WWJZp\downloaded_packages
"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file --no-environ
--no-save -- no-restore --quiet CMD INSTALL \
"C:/Users/User/AppData/Local/Temp/Rtmp4WWJZp/devtools28d0200a7e9b/bbolker-
glmmadmb-ac75f73" \
--library="C:/Users/User/Documents/R/win-library/3.4" --install-tests
* installing *source* package 'glmmADMB' ...
....
> library(glmmADMB)
Loading required package: MASS
Attaching package: ‘glmmADMB’
The following object is masked from ‘package:MASS’:
stepAIC
The following object is masked from ‘package:stats’:
step

This works:
install.packages("R2admb")
install.packages("glmmADMB",
repos=c("http://glmmadmb.r-forge.r-project.org/repos",
getOption("repos")),
type="source")
library(glmmADMB)

Related

Failing to install LTM in R

I'm a complete beginner with R and any kind of programming really, and struggling with installing the LTM package for use in making a rasch analysis in SPSS 26.
I've used the command
install.packages("ltm")
tried in R3.3, 3.5 and 3.6 (all in MS windows) as these are compatible with the versions of SPSS I have access to, and get the following output returned:
*Installing package into ‘C:/Users/info/OneDrive/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) also installing the dependencies ‘admisc’, ‘polycor’ There are binary versions available but the source versions are later:
binary source needs_compilation admisc 0.8 0.28 FALSE polycor 0.7-10 0.8-1 FALSE ltm 1.1-1 1.2-0 FALSE installing the source packages ‘admisc’, ‘polycor’, ‘ltm’ trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/admisc_0.28.tar.gz' Content type 'application/x-gzip' length 58877 bytes (57 KB) downloaded 57 KB trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/polycor_0.8-1.tar.gz' Content type 'application/x-gzip' length 13931 bytes (13 KB) downloaded 13 KB trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/ltm_1.2-0.tar.gz' Content type 'application/x-gzip' length 287001 bytes (280 KB) downloaded 280 KB
* installing *source* package 'admisc' ...
** package 'admisc' successfully unpacked and MD5 sums checked
** libs
*** arch - i386 Warning in system(cmd) : 'make' not found ERROR: compilation failed for package 'admisc'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/admisc'
* restoring previous 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/admisc' In R CMD INSTALL
* installing *source* package 'polycor' ...
** package 'polycor' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace 'admisc' 0.8 is being loaded, but >= 0.22 is required ERROR: lazy loading failed for package 'polycor'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/polycor' In R CMD INSTALL ERROR: dependency 'polycor' is not available for package 'ltm'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/ltm' In R CMD INSTALL The downloaded source packages are in
‘C:\Users\info\AppData\Local\Temp\Rtmpc5HpAg\downloaded_packages’ Warning messages: 1: In install.packages("ltm") : installation of package ‘admisc’ had non-zero exit status 2: In install.packages("ltm") : installation of package ‘polycor’ had non-zero exit status 3: In install.packages("ltm") : installation of package ‘ltm’ had non-zero exit status*
I've also attempted to install earlier versions of admisc and polycor but get an error message that they are not available with this version of R.
Hope somebody can spot what I'm doing wrong here!
Thanks in advance
The error message 'make' not found suggests that you need to install Rtools to be able to build packages in Windows.
Since you are using an old R version you also need older Rtools version like Rtools35, found here.
When installing Rtools remember to add rtools to Path using the checkbox in the dialog similar to that one.

R cannot download websockets package from the github

The manual is written here:https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/R
The mentioned code is written in Section 2 of Install libraries
Problems are with this part
library(devtools)
install_github("brettjbush/R-Websockets")
With R and RTools versions above 4.0 I have following error.
> install_github("brettjbush/R-Websockets")
Downloading GitHub repo brettjbush/R-Websockets#HEAD
Installing 1 packages: caTools
Installing package into ‘\\energia.sise/dfs/REDIRECT/german.suhharukov/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/caTools_1.18.0.zip'
Content type 'application/zip' length 317292 bytes (309 KB)
downloaded 309 KB
package ‘caTools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\german.suhharukov\AppData\Local\Temp\RtmpoRYGc0\downloaded_packages
√ checking for file 'C:\Users\german.suhharukov\AppData\Local\Temp\RtmpoRYGc0\remotes1aa03e212c08\brettjbush-R-Websockets-fc7ee9c/DESCRIPTION' (1s)
- preparing 'websockets':
√ checking DESCRIPTION meta-information ...
- cleaning src
Warning in system2(command, args, stdout = NULL, stderr = NULL, ...) :
'CreateProcess' failed to run 'C:\rtools40\usr\bin\make.exe -f "C:/PROGRA~1/R/R-40~1.3/share/make/clean.mk" -f Makevars.win clean'
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'websockets_1.1.7.tar.gz'
Installing package into ‘\\sise/dfs/REDIRECT/MYNAME/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
'\\sise\dfs\REDIRECT\MYNAME\Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'websockets' ...
** using staged installation
** libs
*** arch - i386
Error in system(cmd) :
(converted from warning) 'CreateProcess' failed to run 'C:\rtools40\usr\bin\make.exe -f "Makevars.win" -f "C:/PROGRA~1/R/R-40~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-40~1.3/share/make/winshlib.mk" SHLIB="websockets.dll" OBJECTS="libsock.o"'
* removing '\\sise/dfs/REDIRECT/MYNAME/Documents/R/win-library/4.0/websockets'
Error: Failed to install 'websockets' from GitHub:
(converted from warning) installation of package ‘C:/Users/MYNAME/AppData/Local/Temp/RtmpoRYGc0/file1aa0518554ea/websockets_1.1.7.tar.gz’ had non-zero exit status
> install.packages("caTools")
Installing package into ‘\\sise/dfs/REDIRECT/MYNAME/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/caTools_1.18.0.zip'
Content type 'application/zip' length 317292 bytes (309 KB)
downloaded 309 KB
package ‘caTools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\MYNAME\AppData\Local\Temp\XXXXXXX\downloaded_packages
>
Errors are following
> library(devtools)
Loading required package: usethis
> install_github("brettjbush/R-Websockets")
Downloading GitHub repo brettjbush/R-Websockets#master
trying URL 'https://cran.rstudio.com/bin/windows/Rtools/Rtools35.exe'
Content type 'application/x-msdownload' length 108622512 bytes (103.6 MB)
downloaded 103.6 MB
Error: Failed to install 'websockets' from GitHub:
Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
> pkgbuild::check_build_tools(debug = TRUE)
trying URL 'https://cran.rstudio.com/bin/windows/Rtools/Rtools35.exe'
Content type 'application/x-msdownload' length 108622512 bytes (103.6 MB)
downloaded 103.6 MB
Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
> find_rtools()
[1] TRUE
> Sys.which("ls.exe")
ls.exe
"C:\\Rtools\\bin\\ls.exe"
How can I download this package?
In the notes on github it says "NOTE: This package is no longer maintained. For implementing websocket servers in R, try the httpuv package"
Another possible problem could be that you are running a new version of R with an old version of Rtools. So I'd try to install the newest version of Rtools or run an older version of R with a compatible version of Rtools, such that you can build and compile the package.
I ran your code on my machine running R 4.0.2 and Rtools 4.0.0 and did not face any issues installing the package. So I'd suggest installinng the newest version of R and Rtools from here: https://cran.r-project.org/bin/windows/Rtools/ and trying again.

unable to install packages("caret") completely in R version 3.2.3

> require("caret")
Loading required package: caret
Loading required package: lattice
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘pbkrtest’
So I found that there is lack of "pbkrtest" then I tried to reinstall it.
> install.packages("pbkrtest")
Installing package into ‘C:/Users/ADMIN/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
pbkrtest 0.4-2 0.4-3 FALSE
installing the source package ‘pbkrtest’
trying URL 'https://rweb.crmda.ku.edu/cran/src/contrib/pbkrtest_0.4- 3.tar.gz'
Content type 'application/x-gzip' length 164415 bytes (160 KB)
downloaded 160 KB
* installing *source* package 'pbkrtest' ...
** package 'pbkrtest' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Warning: replacing previous import by 'stats::sigma' when loading 'pbkrtest'
Error : object 'sigma' is not exported by 'namespace:stats'
ERROR: lazy loading failed for package 'pbkrtest'
* removing 'C:/Users/ADMIN/Documents/R/win-library/3.2/pbkrtest'
The downloaded source packages are in
‘C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0\downloaded_packages’
Warning messages:
1: running command '"D:/R-3.2.3/bin/x64/R" CMD INSTALL -l
"C:\Users\ADMIN\Documents\R\win-library\3.2"
C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0/downloaded_packages/pbkrtest_0.4- 3.tar.gz' had status 1
2: In install.packages("pbkrtest") :
installation of package ‘pbkrtest’ had non-zero exit status
It seems like that the installation keeps failing.
As a result, I couldn't use other code using caret packages.
I faced this problem as well on Windows 7. I did following steps in the sequence and it worked.
a) Make sure your R version is updated latest R release 3.2.3
b) The default sources seems to be installing Unix version. So I manually downloaded https://cran.r-project.org/web/packages/pbkrtest/index.html for windows
c) Use manually install function from R menu to install the package.
Cheers,
Ratan
Check version of R by typing version in your console.
If version is not "version.string R version 3.3.2" or later then
Install new version of R from https://cran.r-project.org/bin/windows/base/
Update R version using Tools => Global Options in RStudio.
install package using "install.packages("caret")" in your console.
do require(caret).
test using ?createDataPartition.

XMLSchema 0.8.0 Error in R 3.2.0 on Windows

I'm trying to install the development version (v. 0.8.0) of XMLSchema in R 3.2.0 on a Windows 64-bit computer.
Unfortunately, the release version (v. 0.7.0) doesn't work for the database I am trying to access.
However, when I try to install 0.8.0 from source, I get the following error:
> install.packages("XMLSchema", type="source", repos = NULL)
Installing package into ‘C:/Users/Will/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
* installing *source* package 'XMLSchema' ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in .mergeMethodsTable(generic, mtable, tt, attach) :
trying to get slot "defined" from an object of a basic class ("list") with no slots
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'C:/Users/Will/Documents/R/win-library/3.2/XMLSchema'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Will\Documents\R\win-library\3.2" "XMLSchema"' had status 1
Warning in install.packages :
installation of package ‘XMLSchema’ had non-zero exit status
Any thoughts or insight would be greatly appreciated.
The package worked for previous versions of R, perhaps it's a compatibility problem?
Thanks.

More issues regarding the installation of Rstem package

This question is related to Issues in Installing Rstem Package, but I think the answer provided in the previous one isn't working for my case.
I've downloaded the source package and the installation isn't working correctly. Any help is welcomed!
install.packages("~/Downloads/Rstem_0.4-1.tar.gz", repos = NULL, type = "source")
This is the error I get:
Warning in install.packages :
package ‘~/Downloads/Rstem_0.4-1.tar.gz’ is not available (for R version 2.15.3)
Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘Rstem’ ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘Rstem’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rstem’
Warning in install.packages :
installation of package ‘/Users/mbtangotan/Downloads/Rstem_0.4-1.tar.gz’ had non-zero exit status
Also tried:
install.packages("Rstem", repos = "http://www.omegahat.org/R", type="source")
Got this as output:
trying URL 'http://www.omegahat.org/R/src/contrib/Rstem_0.4-1.tar.gz'
Content type 'application/x-gzip' length 274336 bytes (267 Kb)
opened URL
downloaded 267 Kb
* installing *source* package ‘Rstem’ ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘Rstem’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rstem’
The downloaded source packages are in
‘/private/var/folders/t3/f4r4rwmn7xl80skj6h35ftnh0000gn/T/RtmpWKxXs2/downloaded_packages’
Warning message:
In install.packages("Rstem", repos = "http://www.omegahat.org/R", :
installation of package ‘Rstem’ had non-zero exit status
R Version: 2.15.3, x86_64, OSX.
If make is not found it suggests you need to install an XCode appropriate to your unspecified version of "OSX".
If you did have XCode installed this should succeed (at least it did just now with my MacPro running OSX 10.6.8, R 3.0.0 RC, and XCode 3.2.6 (1761):
install.packages("Rstem", repos = "http://www.omegahat.org/R", type="source")
Whether there might be other problems, I cannot tell. The package was removed from CRAN, so there may be other alligators in the swamp.
FWIW, I have just uploaded to CRAN a new package called SnowballC, which implements the same functions as Rstem and uses the same algorithms. Binary packages for Mac OS X and Windows will be available in a few hours/days.
http://cran.r-project.org/web/packages/SnowballC/

Resources