diff --git a/vignettes/collaboration.Rmd b/vignettes/collaboration.Rmd index 1d983ecc..8e2f9732 100644 --- a/vignettes/collaboration.Rmd +++ b/vignettes/collaboration.Rmd @@ -28,7 +28,7 @@ sha <- gert::git_commit("initial", author = user, committer = user, if (gert::git_branch(repo = path_git) == "master") { gert::git_branch_move("master", "main", repo = path_git) } - + gert::git_clone(path_git, path_alice) gert::git_clone(path_git, path_bob) gert::git_clone(path_git, path_server) @@ -172,7 +172,7 @@ Bob can now query for packets available on the server: ```{r, as = "bob", inwd = path_bob} orderly2::orderly_metadata_extract( - name = "data", + name = "data", options = list(allow_remote = TRUE, pull_metadata = TRUE)) ``` diff --git a/vignettes/common.R b/vignettes/common.R index af88987c..0e8ccaea 100644 --- a/vignettes/common.R +++ b/vignettes/common.R @@ -2,10 +2,10 @@ ## user, so be sure not to define functions here that they might want ## to use. ## -## Typically, include this in the Rmd with +## Typically, include this in the Rmd within a block like: ## ## ```{r, include = FALSE} -## source("common.R") +## ... ## ``` dir_tree <- function(path, sub = ".", ...) { diff --git a/vignettes/dependencies.Rmd b/vignettes/dependencies.Rmd index 6b87eed7..97cb78a2 100644 --- a/vignettes/dependencies.Rmd +++ b/vignettes/dependencies.Rmd @@ -51,7 +51,7 @@ writeLines(c( 'd <- readRDS("data.rds")', 'png("analysis.png")', "plot(y ~ x, d)", - 'dev.off()'), + "dev.off()"), file.path(path, "src", "analysis", "orderly.R")) ``` @@ -91,22 +91,22 @@ orderly2::orderly_init(path) fs::dir_create(file.path(path, "src", "data")) writeLines(c( - 'orderly2::orderly_parameters(cyl = NULL)', - 'd <- mtcars[mtcars$cyl == cyl, ]', + "orderly2::orderly_parameters(cyl = NULL)", + "d <- mtcars[mtcars$cyl == cyl, ]", 'saveRDS(d, "data.rds")'), file.path(path, "src", "data", "orderly.R")) fs::dir_create(file.path(path, "src", "analysis")) writeLines(c( - 'orderly2::orderly_parameters(cyl = NULL)', - 'orderly2::orderly_dependency(', + "orderly2::orderly_parameters(cyl = NULL)", + "orderly2::orderly_dependency(", ' "data",', ' "latest(parameter:cyl == this:cyl)",', ' "data.rds")', 'd <- readRDS("data.rds")', 'png("analysis.png")', "plot(mpg ~ disp, d)", - 'dev.off()'), + "dev.off()"), file.path(path, "src", "analysis", "orderly.R")) ``` diff --git a/vignettes/introduction.Rmd b/vignettes/introduction.Rmd index 5dbbf164..a1ae4dbd 100644 --- a/vignettes/introduction.Rmd +++ b/vignettes/introduction.Rmd @@ -135,7 +135,7 @@ writeLines(c( 'd <- readRDS("incoming.rds")', 'png("analysis.png")', "plot(y ~ x, d)", - 'dev.off()'), + "dev.off()"), file.path(path, "src", "analysis", "orderly.R")) ``` @@ -181,7 +181,7 @@ Let's add some additional annotations to the previous reports: ```{r, include = FALSE} code_data <- readLines(file.path(path, "src", "incoming_data", "orderly.R")) writeLines(c( - 'orderly2::orderly_strict_mode()', + "orderly2::orderly_strict_mode()", 'orderly2::orderly_resource("data.csv")', 'orderly2::orderly_artefact("Processed data", "data.rds")', "", @@ -309,7 +309,7 @@ writeLines(c( 'd <- read.csv("data.csv")', 'png("analysis.png")', "plot(y ~ x, d)", - 'dev.off()'), + "dev.off()"), file.path(path, "src", "use_shared", "orderly.R")) r_output(readLines(file.path(path, "src/use_shared/orderly.R"))) ``` diff --git a/vignettes/plugins.Rmd b/vignettes/plugins.Rmd index 58e67f97..0dd75034 100644 --- a/vignettes/plugins.Rmd +++ b/vignettes/plugins.Rmd @@ -118,7 +118,8 @@ writeLines(c( "License: CC0", "Title: Orderly Database Example Plugin", "Description: Simple example of an orderly plugin.", - "Authors@R: person('Orderly Authors', role = c('aut', 'cre'), email = 'email@example.com')", + "Authors@R: person('Orderly Authors', role = c('aut', 'cre'),", + " email = 'email@example.com')", "Imports: orderly2"), file.path(path_pkg, "DESCRIPTION")) @@ -296,30 +297,30 @@ Taking this a step further, we can also specify a [schema](https://json-schema.o dir.create(file.path(path_pkg, "inst"), FALSE, TRUE) path_schema <- file.path(path_pkg, "inst", "schema.json") writeLines(c( - '{', + "{", ' "$schema": "http://json-schema.org/draft-07/schema#",', - '', + "", ' "type": "object",', ' "additionalProperties": {', ' "type": "object",', ' "properties": {', ' "query": {', ' "type": "string"', - ' },', + " },", ' "rows": {', ' "type": "number"', - ' },', + " },", ' "cols": {', ' "type": "array",', ' "items": {', ' "type": "character"', - ' }', - ' }', - ' },', + " }", + " }", + " },", ' "required": ["query", "rows", "cols"],', ' "additionalProperties": false', - ' }', - '}'), + " }", + "}"), path_schema) json_output(readLines(path_schema)) ```