Show a file from within one of the examples. This function exists for use within orderly help files, vignettes and tutorials and is not meant to form part of your workflows, unless you are doing something very peculiar.
Details
All orderly examples here are runnable, though some will naturally have some pre-requisites (e.g., using a dependency will require that the dependency has been run first).
Examples
# We use constructions like this in the help, to show off features
# of orderly:
orderly_example_show("data")
#>
#> ── src/data/data.R ─────────────────────────────────────────────────────────────
#> orderly_description(
#> display = "A demo data set")
#>
#> x <- jitter(1:30)
#> y <- 0.4 * x + 5 + rnorm(length(x), sd = 2)
#> d <- data.frame(x, y)
#>
#> orderly_artefact("data.rds", description = "A synthetic dataset")
#> saveRDS(d, "data.rds")
# You can run this example:
path <- orderly_example()
#> ✔ Created orderly root at '/tmp/Rtmp3NBL3X/orderly2_ex_1cf14a8fc643'
orderly_run("data", root = path)
#> ℹ Starting packet 'data' `20250807-155615-8ede5322` at 2025-08-07 15:56:15.562526
#> > orderly_description(
#> + display = "A demo data set")
#> > x <- jitter(1:30)
#> > y <- 0.4 * x + 5 + rnorm(length(x), sd = 2)
#> > d <- data.frame(x, y)
#> > orderly_artefact("data.rds", description = "A synthetic dataset")
#> > saveRDS(d, "data.rds")
#> ✔ Finished running data.R
#> ℹ Finished 20250807-155615-8ede5322 at 2025-08-07 15:56:15.587683 (0.02515745 secs)
#> [1] "20250807-155615-8ede5322"