Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Username, full name, email address and GitHub username of the current user

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

r-lib/whoami

Repository files navigation

CRAN RStudio mirror downloadsR-CMD-checkCodecov test coverage

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.

Installation

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")

Usage

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"

Code of Conduct

Please note that the whoami project is released with aContributor Codeof Conduct. Bycontributing to this project, you agree to abide by its terms.

License

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

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp