- Notifications
You must be signed in to change notification settings - Fork6
Username, full name, email address and GitHub username of the current user
License
Unknown, MIT licenses found
Licenses found
r-lib/whoami
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Username, full name, email address, GitHub username of the currentuser
For the username it tries theLOGNAME,USER,LNAME andUSERNAMEenvironment variables first. If these are all unset, or set to an emptystring, then it tries runningid on Unix-like systems andwhoami onWindows.
For the full name of the user, it queries the system services and alsotries the user’s global git configuration. On Windows, it tries findingthe global git configuration inSys.getenv("USERPROFILE") if itdoesn’t find it inSys.getenv("HOME") (often “Documents”).
For the email address it uses the user’s global git configuration. Ittries finding the global git configuration inSys.getenv("USERPROFILE") if it doesn’t find it inSys.getenv("HOME").
For the GitHub username it uses theGITHUB_USERNAME environmentvariable then it tries searching on GitHub for the user’s email address.
Related JavaScript packages:sindresorhus/username,sindresorhus/fullname,sindresorhus/github-username,paulirish/github-email.
Install the package from CRAN as usual:
install.packages("whoami")If you need the development version of this package, install it fromGitHub:
pak::pak("r-lib/whoami")
library(whoami)username()#> [1] "gaborcsardi"fullname()
#> [1] "Gabor Csardi"email_address()
#> [1] "csardi.gabor@gmail.com"gh_username()
#> [1] "gaborcsardi"whoami()
#> username fullname email_address #> "gaborcsardi" "Gabor Csardi" "csardi.gabor@gmail.com" #> gh_username #> "gaborcsardi"Please note that the whoami project is released with aContributor Codeof Conduct. Bycontributing to this project, you agree to abide by its terms.
MIT ©Gábor Csárdi,RStudio
About
Username, full name, email address and GitHub username of the current user
Topics
Resources
License
Unknown, MIT licenses found
Licenses found
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.