Currently, edit_r_profile() and edit_r_environ() always try to create/edit a file directly on the user's home directory regardless of R_PROFILE_USER and R_ENVIRON_USER.
Sys.setenv(R_PROFILE_USER = "/tmp/path/to/.Rprofile")
Sys.getenv('R_PROFILE_USER')
#> [1] "/tmp/path/to/.Rprofile"
usethis::edit_r_profile()
#> ● Edit /Users/watal/.Rprofile
#> ● Restart R for changes to take effect
Currently,
edit_r_profile()andedit_r_environ()always try to create/edit a file directly on the user's home directory regardless ofR_PROFILE_USERandR_ENVIRON_USER.