Skip to content

Commit

Permalink
vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Rodrigues committed Jul 26, 2023
1 parent 8a31d3f commit d399b54
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 9 deletions.
3 changes: 0 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ Imports:
jsonlite,
utils
Suggests:
dplyr,
janitor,
knitr,
rmarkdown,
rvest,
testthat
VignetteBuilder:
knitr
Expand Down
4 changes: 2 additions & 2 deletions dev/0-dev_history.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fusen::inflate(flat_file = "dev/build_envs.Rmd",
# Run but keep eval=FALSE to avoid infinite loop
# Execute in the console directly
fusen::inflate(flat_file = "dev/save_r_nix_revs.Rmd",
vignette_name = "dev-save_r_nix_revs.Rmd",
vignette_name = "[Dev]-Saving historical revisions",
overwrite = TRUE)
```

Expand Down Expand Up @@ -104,7 +104,7 @@ fusen::inflate(flat_file = "dev/zzz.Rmd",

```{r}
fusen::inflate(flat_file = "dev/building_envs_with_rix.Rmd",
vignette_name = "building_envs_with_rix",
vignette_name = "Building reproducible development environments with {rix}",
overwrite = TRUE)
```

Expand Down
24 changes: 23 additions & 1 deletion dev/building_envs_with_rix.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ editor_options:
chunk_output_type: console
---

Basic usage:

```{r}
path_default_nix <- tempdir()
Expand All @@ -20,5 +22,25 @@ rix(r_ver = "current",
```

```{r}
cat(readLines(paste0(path_default_nix, "/default.nix")))
cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
```

Specifying a package on Github:

```{r}
rix(r_ver = "current",
r_pkgs = c("dplyr", "janitor"),
other_pkgs = c("quarto"),
git_pkgs = list(package_name = "housing",
repo_url = "https://github.com/rap4all/housing/",
branch_name = "fusen",
commit = "1c860959310b80e67c41f7bbdc3e84cef00df18e"),
ide = "other",
path = path_default_nix,
overwrite = TRUE)
```

```{r}
cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
```
2 changes: 1 addition & 1 deletion dev/save_r_nix_revs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ web-interface to look for packages and get their revisions.

It is possible to scrape the table and get the data:

```{r}
```{r, eval = F}
library(rvest)
library(dplyr)
library(janitor)
Expand Down
26 changes: 25 additions & 1 deletion vignettes/building_envs_with_rix.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ library(rix)

<!-- WARNING - This vignette is generated by {fusen} from dev/building_envs_with_rix.Rmd: do not edit by hand -->

Basic usage:


```{r}
path_default_nix <- tempdir()
Expand All @@ -35,6 +38,27 @@ rix(r_ver = "current",
```

```{r}
cat(readLines(paste0(path_default_nix, "/default.nix")))
cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
```

Specifying a package on Github:


```{r}
rix(r_ver = "current",
r_pkgs = c("dplyr", "janitor"),
other_pkgs = c("quarto"),
git_pkgs = list(package_name = "housing",
repo_url = "https://github.com/rap4all/housing/",
branch_name = "fusen",
commit = "1c860959310b80e67c41f7bbdc3e84cef00df18e"),
ide = "other",
path = path_default_nix,
overwrite = TRUE)
```

```{r}
cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
```

2 changes: 1 addition & 1 deletion vignettes/dev-save_r_nix_revs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ web-interface to look for packages and get their revisions.
It is possible to scrape the table and get the data:


```{r}
```{r eval = F}
library(rvest)
library(dplyr)
library(janitor)
Expand Down

0 comments on commit d399b54

Please sign in to comment.