I have installed R many time in the last two decades. Today for the first time something went wrong.
After installing on a brand new laptop with windows 10 pro, I get this warning every time I open the program:
During startup - Warning message:
Setting LC_CTYPE= failed
I tried reading about this, but all I could find was MAC related, I have a lenovo thinkpad with windows 10.
Edit: Session Info
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sessioninfo_1.1.1
loaded via a namespace (and not attached):
[1] compiler_3.5.1 assertthat_0.2.0 cli_1.0.1 tools_3.5.1 withr_2.1.2
[6] rstudioapi_0.8 yaml_2.2.0 crayon_1.3.4
Related
I am not sure wether this is the right place for this question, but I've upgraded my R from 3.6.3 to 4.2.2 and my experience has been that the 4.2.2 version is way slower than the older one in some cases. Is this really an issue with R 4.x compared to R 3.6.x or do I need to adjust anything on my setup?
I found this link regarding a problem similar to mine with R 4.0.2: https://github.com/rocker-org/rocker/issues/412
Sample code (runs on average twice as fast on 3.6.3 than on 4.2.2)
I know this could be a package implementation issue rather than an R version issue, but I had problems with other scripts that do not use any of the packages below
library(tictoc)
library(seasonal)
times <- c()
for(j in 1:100) {
print(j)
tic()
for(i in 1:20) {
try({ final(seas(ts(1:120 + runif(120), start = c(1990, 1), frequency = 12))) })
}
elapsed <- toc()
times <- c(elapsed, unname(elapsed$toc - elapsed$tic))
}
Other informations:
→ Everything ran on the same machine
Session Info for 3.6.3
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252 LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] seasonal_1.9.0 tictoc_1.0
loaded via a namespace (and not attached):
[1] x13binary_1.1.39-2 compiler_3.6.3 tools_3.6.3
Session Info for 4.2.2
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.utf8 LC_CTYPE=Portuguese_Brazil.utf8 LC_MONETARY=Portuguese_Brazil.utf8 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] seasonal_1.9.0 tictoc_1.1
loaded via a namespace (and not attached):
[1] colorspace_2.1-0 scales_1.2.1 x13binary_1.1.57-3 compiler_4.2.2 R6_2.5.1 cli_3.6.0 tools_4.2.2 rstudioapi_0.14
[9] lifecycle_1.0.3 munsell_0.5.0 rlang_1.0.6
When running sessionInfo() in Rstudio I get
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.5.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] lubridate_1.8.0 fansi_1.0.3 assertthat_0.2.1 utf8_1.2.2 dplyr_1.0.10 R6_2.5.1 DBI_1.1.3 lifecycle_1.0.2 magrittr_2.0.3
[10] pillar_1.8.1 stringi_1.7.8 rlang_1.0.5 cli_3.4.0 rstudioapi_0.14 snakecase_0.11.0 vctrs_0.4.1 generics_0.1.3 tools_4.2.1
[19] stringr_1.4.1 glue_1.6.2 purrr_0.3.4 janitor_2.1.0 compiler_4.2.1 pkgconfig_2.0.3 tidyselect_1.1.2 tibble_3.1.8
When running the same on an R-session started in the terminal via R I get
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur ... 10.16
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.1
As you can see the outputs differ:
RStudio says it's Monterey (which is correct), cli says it's Big Sur.
BLAS is missing
different packages are loaded via namespace
Both use the same .libPaths().
There's only one R in the path at /usr/local/bin/R.
This behaviour occurs on two different Macs, both with Monterey and R 4.2.1.
So why are the sessions different?
The running component is a copy of the utils::osVersion variable value. As explained in ?sessionInfo, that is set to the value used when R was compiled, which is typically 10.16 on Intel Macs.
Presumably RStudio and R.app replace that value with a correct one when run, but command line R doesn't.
If you build R yourself under Monterey, you'll see the correct value.
Regarding the packages loaded: RStudio loads a bunch of packages to support its API.
Regarding BLAS: I don't know, but it could be similar to the running issue, i.e. the front-end changed it.
When I open Rstudio I get this error message in my console
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
It happens when I open any script or Rproject. I couldn't find any info on this error and how to address it. I've tried uninstalling R and installing it again but the problem persists. Any ideas on how to solve this?
Here is my session Info
> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] geobr_1.2.1
loaded via a namespace (and not attached):
[1] compiler_3.6.2 magrittr_1.5 class_7.3-15
[4] DBI_1.1.0 tools_3.6.2 units_0.6-5
[7] Rcpp_1.0.3 KernSmooth_2.23-16 grid_3.6.2
[10] e1071_1.7-3 classInt_0.4-2 sf_0.8-0
I'm using RBioFormats for image processing purposes with R. I'm not able to load RBioFormats library when my computer has not internet connection.
R's console throught the error message:
Error: package or namespace load failed for 'RbioFormats':
.onLoad failed in loadNamespace() for 'RBioFormats', details:
call: NULL
error: failed to download Bio-Formats Java library
Check your internet connection
I'm using GNU/Linux OS. Firstly, I thought it was due to the version 11 of java environment installed. I've noticed the v11 is a develper version. After installing java environment v8, result in the same error output. The result is that I cannot use RBioFormats library when I have not internet connection.
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Anarchy Linux
Matrix products: default
BLAS: /usr/lib/libblas.so.3.8.0
LAPACK: /usr/lib/liblapack.so.3.8.0
locale:
[1] LC_CTYPE=es_ES.UTF-8 LC_NUMERIC=C LC_TIME=es_ES.UTF-8 LC_COLLATE=es_ES.UTF-8 LC_MONETARY=es_ES.UTF-8
[6] LC_MESSAGES=es_ES.UTF-8 LC_PAPER=es_ES.UTF-8 LC_NAME=es_ES.UTF-8 LC_ADDRESS=es_ES.UTF-8 LC_TELEPHONE=es_ES.UTF-8
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=es_ES.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RBioFormats_0.0.54 rJava_0.9-11
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 locfit_1.5-9.1 lattice_0.20-38 png_0.1-7 fftwtools_0.9-8 digest_0.6.19 bitops_1.0-6 tiff_0.1-5
[9] grid_3.6.0 EBImage_4.26.0 tools_3.6.0 htmlwidgets_1.3 RCurl_1.95-4.12 jpeg_0.1-8 abind_1.4-5 parallel_3.6.0
[17] compiler_3.6.0 BiocGenerics_0.30.0 htmltools_0.3.6
Since RBioFormats version 0.057, is not required Internet connection on startup anymore. Link to commit
According to the shortcuts help (Alt+Shift+K) the combination Ctrl+Shift+D should run the documentation routines. (This is also said in Section 5.1 of Hadley Wickhams "R packages" http://runsheng.github.io/attachment/r-packages.pdf.) But in my RStudio-setting, it doublicates the selected row (so I don't belive it is a global usage problem brought up in the answers here: Visual Studio won't recognize key combination). On https://support.rstudio.com/hc/en-us/community/posts/201819358-Ctrl-Shift-D-doesn-t-run-document-in-preview-release the issue was brought up by someone, but without a solution. How can I make RStudio do what it should do?
I'm using RStudio version 0.99.902 and sessionInfo() gives:
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] hmi_0.1.0 roxygen2_5.0.1 coda_0.18-1 MASS_7.3-45 devtools_1.12.0
loaded via a namespace (and not attached):
[1] magrittr_1.5 tools_3.3.1 withr_1.0.2 rstudioapi_0.6 Rcpp_0.12.5
[6] memoise_1.0.0 stringi_1.1.1 grid_3.3.1 stringr_1.0.0 digest_0.6.9
[11] lattice_0.20-33
Can you double check what these options are set to in Project Options?
You might need to ensure that both
Use devtools package functions in available
Generate documentation with Roxygen
are both checked.