Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

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
/amiPublic
forked frombriandconnelly/ami

Checks for Various Computing Environments

License

NotificationsYou must be signed in to change notification settings

mpadge/ami

 
 

Repository files navigation

Lifecycle: experimentalCRAN statusR-CMD-checkCodecov test coverage

ami (“am I?”) provides a unified collection of lightweight checks thatcan be used to better understand the environments in which your code isrunning. This includes different operating systems, ContinuousIntegration (CI) environments, containers, and more. Similar oridentical functions already exist. However, most of these functionsexist within highly specialized packages, so using several of them canquickly create a lot of dependencies for your own projects.

Installation

You can install the latest released version of ami by running:

install.packages("ami")

If you’d like to try out the development version of ami, you can installdirectly from GitHub:

# install.packages("remotes")remotes::install_github("briandconnelly/ami")

Some Examples

Am I online?

ami::online()#> [1] TRUE

Am I using RStudio? Am I using a dark theme?

ami::using_rstudio()#> [1] FALSEami::using_rstudio_dark_theme()#> [1] FALSE

Am I using macOS and an Intel Mac?

ami::using_macos()&&ami::using_x86_cpu()#> [1] FALSE

Are we running in a Docker container?

ami::using_docker_container()#> [1] FALSE

Are we using a continuous integration service? GitHub Actions?

ami::using_ci()#> [1] FALSEami::using_github_actions()#> [1] FALSE

Other environments

ami can be used to check any environment variable. For example, we cansee if we’re running in aPoetryenvironment:

ami::using_envvar("POETRY_ACTIVE")#> [1] FALSE

We can also check for package options. Here, we’ll see whetherboot is configured to doparallel bootstrapping using multiple cores:

ami::using_option("boot.parallel","multicore")#> [1] FALSE

If you’re using options as part of package development, check out theoptions package.

About

Checks for Various Computing Environments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R99.8%
  • Rez0.2%

[8]ページ先頭

©2009-2025 Movatter.jp