getUsername.System: Retrieves the name of the user running R

System$getUsernameR Documentation

Retrieves the name of the user running R

Description

Retrieves the name of the user running R.

Usage

## Static method (use this):
## System$getUsername(...)

## Don't use the below:
## S3 method for class 'System'
getUsername(static, ...)

Details

First, this function checks the system environment variables USER, and USERNAME. Second, it checks Sys.info()["user"] for user name details. Finally, it tries to query the system command whoami.

Value

Returns a character string.

See Also

*getHostname().


HenrikBengtsson/R.utils documentation built on March 7, 2024, 9:37 a.m.