rappdirs

Find OS-specific directories to store data, caches, and logs. A port of python's AppDirs

https://github.com/r-lib/rappdirs

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    3 of 7 committers (42.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary

Keywords

appdir r

Keywords from Contributors

documentation-tool spreadsheet setup package-creation curl visualisation unit-testing devtools regular-expression git-client
Last synced: 10 months ago · JSON representation

Repository

Find OS-specific directories to store data, caches, and logs. A port of python's AppDirs

Basic Info
Statistics
  • Stars: 89
  • Watchers: 4
  • Forks: 15
  • Open Issues: 6
  • Releases: 4
Topics
appdir r
Created almost 14 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License Code of conduct

README.Rmd

---
output: github_document
---



```{r}
#| include: false
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# rappdirs


[![R-CMD-check](https://github.com/r-lib/rappdirs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/rappdirs/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/r-lib/rappdirs/graph/badge.svg)](https://app.codecov.io/gh/r-lib/rappdirs)


`rappdirs` is a port of [appdirs](https://github.com/ActiveState/appdirs) to R.
It lets you find the appropriate directory to save caches, logs, and data, on Linux, Mac, and Windows.
It allows you to store files that need to shared across R sessions in a way that aligns with the [CRAN policies](https://cran.r-project.org/web/packages/policies.html).

## Motivation

What directory should your app use for storing user data?
If running on Mac OS X, you should use:

    ~/Library/Application Support/

If on Windows (at least English Win XP) that should be:

    C:\Documents and Settings\\Application Data\Local Settings\\

or possibly:

    C:\Documents and Settings\\Application Data\\

for [roaming profiles](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc766489(v=ws.10)) but that is another story.

On Linux (and other Unices) the dir, according to the [XDG spec](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) (and subject to some interpretation), is either:

    ~/.config/     

or possibly:

    ~/.local/share/

## Installation

Stable version:

```r
install.packages("rappdirs")
```

Development version:

```r
pak::pak("r-lib/rappdirs")
```

## Usage

This kind of thing is what rappdirs is for.
rappdirs will help you choose an appropriate:

-   user data dir (`user_data_dir()`)
-   user config dir (`user_config_dir()`)
-   user cache dir (`user_cache_dir()`)
-   site data dir (`site_data_dir()`)
-   user log dir (`user_log_dir()`)

For example, on Mac:

```{r}
library(rappdirs)
appname <- "SuperApp"
appauthor <- "Acme"
user_config_dir(appname, appauthor)
user_data_dir(appname, appauthor)
site_data_dir(appname, appauthor)
user_cache_dir(appname, appauthor)
user_log_dir(appname, appauthor)
```

Owner

  • Name: R infrastructure
  • Login: r-lib
  • Kind: organization

GitHub Events

Total
  • Issues event: 3
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 4
  • Push event: 7
  • Pull request event: 4
  • Create event: 1
Last Year
  • Issues event: 3
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 4
  • Push event: 7
  • Pull request event: 4
  • Create event: 1

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 151
  • Total Committers: 7
  • Avg Commits per committer: 21.571
  • Development Distribution Score (DDS): 0.556
Past Year
  • Commits: 11
  • Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Hadley Wickham h****m@g****m 67
Gábor Csárdi c****r@g****m 29
Trevor L. Davis t****s@s****u 28
Gregory Jefferis j****s@g****m 23
Kirill Müller k****r@i****h 2
François Michonneau f****u@g****m 1
trevor t****d@s****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 26
  • Total pull requests: 23
  • Average time to close issues: 11 months
  • Average time to close pull requests: about 1 year
  • Total issue authors: 16
  • Total pull request authors: 10
  • Average comments per issue: 3.69
  • Average comments per pull request: 1.35
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 2 days
  • Average time to close pull requests: 18 minutes
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • gaborcsardi (7)
  • hadley (4)
  • jefferis (2)
  • EmilyKubicek (1)
  • cderv (1)
  • jennybc (1)
  • russellpierce (1)
  • HenrikBengtsson (1)
  • Shelmith-Kariuki (1)
  • mjsteinbaugh (1)
  • daattali (1)
  • lgeistlinger (1)
  • surmann (1)
  • wch (1)
  • steffilazerte (1)
Pull Request Authors
  • jefferis (10)
  • trevorld (3)
  • krlmlr (3)
  • hadley (2)
  • gaborcsardi (2)
  • vejnar (2)
  • aki-nishimura (1)
  • daattali (1)
  • adamhsparks (1)
  • fmichonneau (1)
Top Labels
Issue Labels
upkeep (6) feature (3) documentation (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 719,138 last-month
  • Total docker downloads: 132,456,807
  • Total dependent packages: 148
  • Total dependent repositories: 305
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: rappdirs

Application Directories: Determine Where to Save Data, Caches, and Logs

  • Versions: 4
  • Dependent Packages: 148
  • Dependent Repositories: 305
  • Downloads: 719,138 Last month
  • Docker Downloads: 132,456,807
Rankings
Downloads: 0.3%
Dependent packages count: 0.7%
Dependent repos count: 0.9%
Stargazers count: 4.6%
Average: 4.8%
Forks count: 4.9%
Docker downloads count: 17.3%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.2 depends
  • covr * suggests
  • roxygen2 * suggests
  • testthat >= 3.0.0 suggests
  • withr * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/pr-fetch v2 composite
  • r-lib/actions/pr-push v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite