Skip to content

Commit 8fb7aec

Browse files
committed
Convert chunk and re-render readme
1 parent 0f9c9e0 commit 8fb7aec

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

README.Rmd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ output: github_document
44

55
<!-- README.md is generated from README.Rmd. Please edit that file -->
66

7-
```{r, include = FALSE}
7+
```{r}
8+
#| include: false
89
knitr::opts_chunk$set(
910
collapse = TRUE,
1011
comment = "#>",
@@ -63,7 +64,8 @@ Set the `callback` argument to run an R function, or rlang-style formula, every
6364
- Uses the 'later' package to execute the callback when R is idle at the top level, or whenever `later::run_now()` is called, for instance automatically in Shiny's event loop.
6465
- Function is called back with a character vector of the paths of all files which have changed.
6566

66-
```{r example}
67+
```{r}
68+
#| label: example
6769
library(watcher)
6870
dir <- file.path(tempdir(), "watcher-example")
6971
dir.create(dir)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ w
7878
#> start: function ()
7979
#> stop: function ()
8080
#> Private:
81-
#> path: /tmp/RtmpR5tJmF/watcher-example
81+
#> path: /tmp/RtmpLJO67C/watcher-example
8282
#> running: FALSE
8383
#> watch: externalptr
8484
w$start()
@@ -88,19 +88,19 @@ file.create(file.path(dir, "newfile"))
8888
file.create(file.path(dir, "anotherfile"))
8989
#> [1] TRUE
9090
later::run_now(1)
91-
#> [1] "/tmp/RtmpR5tJmF/watcher-example/newfile"
92-
#> [1] "/tmp/RtmpR5tJmF/watcher-example/anotherfile"
91+
#> [1] "/tmp/RtmpLJO67C/watcher-example/newfile"
92+
#> [1] "/tmp/RtmpLJO67C/watcher-example/anotherfile"
9393

9494
newfile <- file(file.path(dir, "newfile"), open = "r+")
9595
cat("hello", file = newfile)
9696
close(newfile)
9797
later::run_now(1)
98-
#> [1] "/tmp/RtmpR5tJmF/watcher-example/newfile"
98+
#> [1] "/tmp/RtmpLJO67C/watcher-example/newfile"
9999

100100
file.remove(file.path(dir, "newfile"))
101101
#> [1] TRUE
102102
later::run_now(1)
103-
#> [1] "/tmp/RtmpR5tJmF/watcher-example/newfile"
103+
#> [1] "/tmp/RtmpLJO67C/watcher-example/newfile"
104104

105105
w$stop()
106106
unlink(dir, recursive = TRUE, force = TRUE)

0 commit comments

Comments
 (0)