Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getUsername.System

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


R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.