I've been looking at StackOverflow forums like this and this but I cannot find a problem.
What I'm having an issue with is that I cannot install the caret package because the dependencies cannot be installed. I even tried to run install.packages("caret", dependencies = T) and that failed. I have also tried install.packages("caret", dependencies = c("Depends", "Suggests")) and it failed on installing rPython dependencies.
There seems to be issues saying that there is a configuration script and that I need to manually configure it.
I tried installing car, lme4, and other dependencies manually but only ggplot2 was able to be installed correctly. I have no idea what else to do, below is my session Info. Please help!
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] codetools_0.2-14
loaded via a namespace (and not attached):
[1] tools_3.2.2 data.table_1.9.6 chron_2.3-47
did you try downloading the packages manually from CRAN and installing them manually from Rstudio? Some of the packages require rebooting the Rstudio after package installation or after package inclusion in the Rscript. That worked for me..
also, try installing different versions of the packages until one of them works for your case..that's what I did in the case of "ggvis package
Related
I am having some issue with installing a package in R 4.0.2 from binaries. Here is my attempt:
> install.packages("C:/Users/MNestor/Downloads/libSBML_5.18.0.zip", repos = NULL, type = "win.binary")
Installing package into ‘C:/Users/MNestor/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)
package ‘libSBML’ successfully unpacked and MD5 sums checked
Warning messages:
1: multiple methods tables found for ‘type’
2: multiple methods tables found for ‘type<-’
Next I load library:
> library('libSBML')
Error: package or namespace load failed for ‘libSBML’:
package ‘libSBML’ was installed before R 4.0.0: please re-install it
This error is confusing to me because I am working in R 4.0.2 and have clearly just done a fresh install.
I have tried
deleting the library folder and reinstalling
running remove.packages('libSBML') and reinstalling
For reference here are my library directories:
> .libPaths()
[1] "C:/Users/MNestor/Documents/R/win-library/4.0"
[2] "C:/Program Files/R/R-4.0.2/library"
The libSMBL folder is located in the first library path, and not the second (as expected).
Here is session info:
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] rsbml_2.46.0 BiocGenerics_0.34.0
loaded via a namespace (and not attached):
[1] BiocManager_1.30.10 compiler_4.0.2 tools_4.0.2 remotes_2.2.0
[5] stats4_4.0.2 SBMLR_1.84.0 graph_1.66.0
The error message is maybe a bit confusing, but it's saying the package is already compiled for an earlier version of R. (That's what the option "win.binary" means).
R 4.0 and earlier binaries are not compatible because of updated compilers and build tools.
You'll need to install the package from source, which likely means installing R tools (https://cran.r-project.org/bin/windows/Rtools/) or you'll need to use a version that is pre-built for R 4.0 or later.
I need a packages witch is located on Github. And I am aware that there are multiple solutions to install the package in R.
I am trying to install the package on a Windows server. This is what I tried:
Solution 1 (which is based on the Vignette)
install.packages("devtools")
library("devtools")
devtools::install_github("bmschmidt/wordVectors")
Error: Could not find tools necessary to compile a package
In addition: Warning messages:
1: In strptime(xx, f, tz = tz): unable to identify current timezone 'C':
Please set environment variable 'TZ'
I tried many things to solve this:
Reinstalling Devtools, use the CRAN devtools version
Reinstalling R and Rstudio (installing the latest versions as admin) (Error : Could not find build tools necessary to build)
But still the same error...
So I tried a workaround to install the packages on my computer:
Solution two
Download ZIP file from (https://github.com/bmschmidt/wordVectors)
Unzip the ZIP file
But the result is an error again:
library(devtools)
install("path/to/unzipped/file")
library("wordVectors")
Error there is no packages called wordVectors.
Anyone an idea what is going on? I struggled the whole day with this issue. Help is really appreciated! Thanks!
Edit
Also Rtools is (re)installed (the latest version...)
Edit 2
As requested in the comments (#DJV):
> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server >= 2012 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.2 tools_3.5.2
I need to obtain user input from the svDialogs R package, e.g. using svDialogs::dlgInput(). However, attempting to do this without attaching the package with library() or require() gives an error:
svDialogs::dlgInput("Example")
Error in svDialogs::dlgInput("Example") : attempt to apply non-function
The following works fine:
library(svDialogs)
svDialogs::dlgInput("Example")
Why might this be, and what might be a way around it? I have the current CRAN version of the package (0.9.57).
Update
I have tried installing previous versions of svDialogs, as well as comparing my code with the source code from the cgam package, which depends on svDialogs. Currently the entire svDialogs package is imported in my NAMESPACE, which is how it is used in cgam. But I still get the same error unless I first run library(svDialogs). Any tips?
Update 2
I also imported the entire svGUI package in my NAMESPACE, with no luck.
sessionInfo() R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale: [1] LC_COLLATE=English_United States.1252
LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils
datasets methods base
other attached packages: [1] svDialogs_0.9-57 svGUI_0.9-55
loaded via a namespace (and not attached): [1] compiler_3.4.3
tools_3.4.3
I want to update an R package using Microsoft R Open via Microsoft R Server. I can see in MRAN package repo that the package version is 1.2.0 but when I try an update in RStudio it says all packages up to date although respective package is still on version 1.1.0 (dbplyr in my case). Why is R not updating the package? RStudio points to C:\Program Files\Microsoft\ML Server\R_SERVER.
sessionInfo()
#>R version 3.4.1 (2017-06-30)
#>Platform: x86_64-w64-mingw32/x64 (64-bit)
#>Running under: Windows 7 x64 (build 7601) Service Pack 1
#Matrix products: default
#>locale:
#>[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
#>[4] LC_NUMERIC=C LC_TIME=English_United States.1252
#>attached base packages:
#>[1] stats graphics grDevices utils datasets methods base
#>other attached packages:
#>[1] RevoUtilsMath_10.0.0 RevoUtils_10.0.5 RevoMods_11.0.0 MicrosoftML_1.5.0 mrsdeploy_1.1.2 RevoScaleR_9.2.1
#>[7] lattice_0.20-35 rpart_4.1-11
#>loaded via a namespace (and not attached):
#>[1] codetools_0.2-15 CompatibilityAPI_1.1.0 foreach_1.4.4 grid_3.4.1 R6_2.2.0
#>[6] jsonlite_1.4 curl_2.6 iterators_1.0.8 tools_3.4.1 yaml_2.1.14
#>[11] compiler_3.4.1 mrupdate_1.0.1
packageVersion("dbplyr")
#>‘1.1.0’
RStudio IDE has as mirror Global (CDN) - RStudio but I guess this is overruled by MRAN?
So you are running Microsoft R Server, and that has an R version of 3.4.1. I believe what happens is that when you try to upgrade using MRAN, the upgrade takes into consideration which version of R you're on - and (I believe again) the latest version of dbplyr for R 3.4.1 was 1.1.0. You can read more about snapshots and checkpoints here.
What you can do if you want is to install the package straight from the CRAN repo, using code something like so:
install.packages("dbplyr", repos = "https://cloud.r-project.org/", dependencies=TRUE, lib = pkg.dir)
Hope this helps!
Niels
I want to read more details about the new function in data.table v 1.8.11, after reading the link
I tried ?melt.data.table as pointed in the above link.
But there's no documents..
No documentation for melt.data.table?in specified packages and libraries:
you could try ??melt.data.table?
Here's my sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.8.11
Did I miss something?
EDIT On Jan20 2014
** Problems Still Not Solved**
I tried unistalled the data.table and deleted the library directory.
And then installed using the precompiled for windows in this link
> install.packages("~/Downloads/data.table_1.8.11.zip", repos = NULL)
Warning in install.packages :
package 憕/Downloads/data.table_1.8.11.zip?is not available (for R version 3.0.2)
Installing package into 慍:/Users/James/R/win-library/3.0?(as 憀ib?is unspecified)
package 慸ata.table?successfully unpacked and MD5 sums checked
The sessionInfo() is the same after reinstalling, and I put all the information here.
Still the ?melt.data.table not working.
[Edit by Matt] In turns out the data.table homepage was misleading (now fixed) and the Windows .zip on that page was 5 months old.
The correct way to install from R-Forge is
install.packages("data.table", repos="http://R-Forge.R-project.org").
Then the problem is solved and the documentation for ?melt.data.table is available.
Sorry this belongs in a comment but it's too long...
You might want to try re-installing data.table 1.8.11 (I found it here). When I do that, then start a new R session and:
library(data.table)
# data.table 1.8.11 For help type: help("data.table")
sessionInfo()
# R version 3.0.2 (2013-09-25)
# Platform: x86_64-w64-mingw32/x64 (64-bit)
#
# locale:
# [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
# [4] LC_NUMERIC=C LC_TIME=English_United States.1252
#
# attached base packages:
# [1] stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] data.table_1.8.11
#
# loaded via a namespace (and not attached):
# [1] plyr_1.8 reshape2_1.2.2 stringr_0.6.2 tools_3.0.2
Note the bit at the end. It looks like data.table 1.8.11 loads reshape2, which probably contains melt.data.table(...). Did you truncate your sessionInfo, or were they not loaded?