0

Sys.getenv returns RSTUDIO_USER_IDENTITY and USER environment variables. Does anyone have an explanation of what these environment variables do?

Leon Katsnelson
  • 450
  • 3
  • 5

1 Answers1

0

USER is a system environment variable unrelated to RStudio. It's what you should use to pick up the current system username (i.e the username of the user running the R session).

RSTUDIO_USER_IDENTITY is generally the same as USER, though it can differ in debug configurations. You probably want to use USER unless you have a very specific reason to do otherwise.

Jonathan
  • 8,497
  • 41
  • 35