-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
105 lines (77 loc) · 2.27 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# roam <img src="man/figures/logo.svg" align="right" height="139" />
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://CRAN.R-project.org/package=roam)
[](https://github.com/finyang/roam/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The goal of roam is to ...
1. Allow 'regular looking' R objects in packages to exceed the 5MB limit.
2. Support updating of datasets without updating packages by using functions that pull from remote resources.
3. Make it easy for packages to include these 'roaming' datasets.
## Installation
You can install the **stable** version from
[CRAN](https://cran.r-project.org/package=roam).
``` r
install.packages("roam")
```
You can install the **development** version from
[Github](https://github.com/FinYang/roam)
``` r
# install.packages("remotes")
remotes::install_github("FinYang/roam")
```
## Example
```{r example}
#| eval: false
library(roam)
bee <- new_roam(
"roam", "bee",
function(version)
read.csv(
"https://raw.githubusercontent.com/finyang/roam/master/demo/bee_colonies.csv"))
roam_activate(bee)
head(bee)
#> The roam data object "bee" in package roam does not exist locally
#> Would you like to download and cache it? (Yes/no/cancel)
```
*The data is downloaded to a local cache using {rappdirs}, then returned as the data itself*
```{r}
#| include: false
#| echo: false
library(roam)
bee <- new_roam(
"roam", "bee",
function(version)
read.csv(
"https://raw.githubusercontent.com/finyang/roam/master/demo/bee_colonies.csv"))
roam_activate(bee)
roam_update(bee)
```
```{r}
#| echo: false
head(roam_update(bee))
```
### Accessing cached data
```{r}
head(bee)
```
### Updating cached data
```{r}
head(roam_update(bee))
```
### Deleting cached data
```{r}
roam_delete(bee)
```