Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughjonesd/onetime
Run R code just once
https://github.com/hughjonesd/onetime
r
Last synced: 25 days ago
JSON representation
Run R code just once
- Host: GitHub
- URL: https://github.com/hughjonesd/onetime
- Owner: hughjonesd
- License: other
- Created: 2020-01-17T17:23:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-04T10:52:05.000Z (about 1 year ago)
- Last Synced: 2024-10-09T09:39:26.863Z (about 1 month ago)
- Topics: r
- Language: R
- Homepage: https://hughjonesd.github.io/onetime/dev/
- Size: 885 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```[![CRAN status](https://www.r-pkg.org/badges/version/onetime)](https://CRAN.R-project.org/package=onetime)
[![R-universe](https://hughjonesd.r-universe.dev/badges/onetime)](https://hughjonesd.r-universe.dev/onetime/)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/hughjonesd/onetime/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hughjonesd/onetime/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/hughjonesd/onetime/branch/master/graph/badge.svg)](https://app.codecov.io/gh/hughjonesd/onetime?branch=master)# onetime
> Listen very carefully. I shall say this only once.
[Michelle Dubois, *'Allo 'Allo*](https://www.youtube.com/watch?v=M-_5JJmNB6E)
The onetime package provides convenience functions to run R code only once
(ever) per user. For example, you can:* Show a startup message only the first time (ever) that a package is loaded.
* Run cleanup code just once after an upgrade.
* Show the user a message, with the option not to show it again.Onetime is a lightweight package. It requires just two package dependencies,
rappdirs and filelock, with no further indirect dependencies. The total
size including these dependencies is less than 50 Kb.* For more information, see the [vignette](https://hughjonesd.github.io/onetime/dev/articles/onetime.html).
* Development documentation is at .
```{r, child = "example.Rmd"}
```## Installation
Install onetime from [r-universe](https://r-universe.dev):
``` r
install.packages("onetime", repos = c("https://hughjonesd.r-universe.dev",
"https://cloud.r-project.org"))
```Or on CRAN:
``` r
install.packages("onetime")
```Or install the development version from github with:
``` r
# install.packages("remotes")
remotes::install_github("hughjonesd/onetime")
```