HenrikBengtsson / startup

:wrench: R package: startup - Friendly R Startup Configuration
https://henrikbengtsson.github.io/startup/
160 stars 5 forks source link

Breaking changes in R 4.0.4/R 4.1? #96

Closed pat-s closed 3 years ago

pat-s commented 3 years ago

I've updated to R 4.0.4 RC and R-devel (R Under development (unstable) (2021-02-07 r79964) and seeing startup having issues finden RProfile.d / Renviron.d dirs.

These exist and I haven't changed anything lately.

startup::startup(debug = TRUE)   

0.000s: System information:
0.001s: - R_HOME: '/Library/Frameworks/R.framework/Resources' (existing folder)
0.001s: - R call: radian --quiet --no-restore-history --no-readline --no-save --no-restore-data
0.002s: - Current directory: '/Users/pjs/git/fselector'
0.002s: - User's home directory: '~' => '/Users/pjs' (existing folder)
0.002s: - Search path: '.GlobalEnv', 'package:stats', 'package:graphics', 'package:grDevices', 'package:utils', 'package:datasets', 'package:methods', 'Autoloads', 'package:base'
0.002s: - Loaded namespaces: 'compiler', 'startup', 'graphics', 'tools', 'utils', 'grDevices', 'stats', 'datasets', 'methods', 'base'
0.002s: The following has already been processed by R:
0.003s: - R_ENVIRON: ''
0.003s: - R_ENVIRON_USER: ''
0.005s: - '/Library/Frameworks/R.framework/Resources/etc/Renviron' (23 lines; 2111 bytes) setting 23 environment variables ('R_PLATFORM', 'R_PAPERSIZE_USER', 'R_PAPERSIZE', 'R_PRINTCMD', 'R_RD4PDF', 'R_TEXI2DVICMD', 'R_GZIPCMD', 'R_UNZIPCMD', 'R_ZIPCMD', 'R_BZIPCMD', 'R_BROWSER', 'EDITOR', 'PAGER', 'R_PDFVIEWER', 'LN_S', 'MAKE', 'SED', 'TAR', 'R_SYSTEM_ABI', 'R_STRIP_SHARED_LIB', 'R_STRIP_STATIC_LIB', 'R_LIBS_USER', 'R_QPDF')
0.006s: - '~/.Renviron' => '/Users/pjs/.Renviron' (0 lines; 4 bytes) setting 0 environment variables
0.007s: - R_DEFAULT_PACKAGES: '' (= 'base,methods,datasets,utils,grDevices,graphics,stats')
0.008s: - R_LIBS: ''
0.008s: - R_LIBS_SITE: ''
0.008s: - R_LIBS_USER: '~/Library/R/x86_64/4.1/library'
0.009s: - R_PROFILE: ''
0.009s: - R_PROFILE_USER: ''
0.009s: - '~/.Rprofile' => '/Users/pjs/.Rprofile' (1 code lines; 20 bytes)
0.010s: startup::startup()-specific processing ...
0.010s: Found no corresponding startup directory './.Renviron.d'.
0.013s: Found no corresponding startup directory './.Rprofile.d'.
0.014s: - unloading the 'startup' package
0.015s: - Search path: '.GlobalEnv', 'package:stats', 'package:graphics', 'package:grDevices', 'package:utils', 'package:datasets', 'package:methods', 'Autoloads', 'package:base'
0.015s: - Loaded namespaces: 'compiler', 'graphics', 'tools', 'utils', 'grDevices', 'stats', 'datasets', 'methods', 'base'
0.015s: startup::startup()-specific processing ... done
0.030s: The following will be processed next by R:
0.031s: - R_HISTFILE: ''
0.045s: - .First(): no such function on search()
0.046s: - Remaining packages per R_DEFAULT_PACKAGES to be attached by base::.First.sys() (in order): 

I see that it tries to look for the dirs in the current dir rather than in my home dir - was it like this all the time? I think I might have seen a ~/.Rprofile.d before?

The only r-core changelog item related to path handling is:

path.expand() can expand ~user on most Unix-alikes even when readline is not in use. It tries harder to expand ~, for example should environment variable HOME be unset.

pat-s commented 3 years ago

Re-installed both R versions again and now it seems to be working ❓