Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Cannot retrieve user environment #5

Open
caseywross opened this issue Jul 26, 2022 · 1 comment
Open

Cannot retrieve user environment #5

caseywross opened this issue Jul 26, 2022 · 1 comment

Comments

@caseywross
Copy link

During the class activity, I was unable to retrieve the user level environment variable.

usethis::edit_r_environ("user")
#> • Edit '/Users/caseyross/.Renviron'
#> • Restart R for changes to take effect

In the .Renviron file I typed:

WTF_USER=CaseyRoss

But then I get an empty character when trying to retrieve it

Sys.getenv("user")
#> [1] ""

The project level setting worked when I was troubleshooting with David, but now it is also returning an empty character. David suspected that the space in my "Data Science" folder name may be causing the trouble.

usethis::edit_r_environ("project")
✔ Setting active project to '/Users/caseyross/Data Science/personal-radmin'
#> • Modify '.Renviron'
#> • Restart R for changes to take effect
WTF_PROJECT=CaseyRoss
Sys.getenv("project")
#> [1] ""
@shannonpileggi
Copy link
Collaborator

Thank you for reporting @caseywross! I believe this is due to the confusion of .Renviron files not being additive between user and project. Does that make sense now?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants