Skip to contents

Save your workspace

Usage

save_workspace(
  file = NULL,
  encoding = "UTF-8",
  append = FALSE,
  preventOverwriting = TRUE,
  silent = justifier::opts$get("silent")
)

Arguments

file

If specified, the file to export the justification to.

encoding

The encoding to use when writing the file.

append

Whether to append to the file, or replace its contents.

preventOverwriting

Whether to prevent overwriting an existing file.

silent

Whether to be silent or chatty.

Value

The result of a call to export_justification().

Examples

clean_workspace(force = TRUE, silent=FALSE);
#> Your justifier workspace has been cleaned and is now empty.
log_decision("First we start using `justifier`.",
             silent=FALSE);
#> Added new decision with identifier 'lpxt_D7n8bpcxf' to a justifier workspace that already contained 0 justifications.
log_decision(paste0("Then we start documenting our ",
                    "decisions and justifications."),
             silent=FALSE);
#> Added new decision with identifier 'fqzv_D7n8bpcxf' to a justifier workspace that already contained 1 justifications.
log_decision("Then we start learning from ourselves.",
             silent=FALSE);
#> Added new decision with identifier 'twyx_D7n8bpcxf' to a justifier workspace that already contained 2 justifications.
save_workspace();
#> ---
#> decision:
#>   - id: lpxt_D7n8bpcxf
#>     label: First we start using `justifier`.
#>     description: ''
#>     type: ''
#>     justification: ''
#>     date: '2023-03-13'
#>   - id: fqzv_D7n8bpcxf
#>     label: Then we start documenting our decisions and justifications.
#>     description: ''
#>     type: ''
#>     justification: ''
#>     date: '2023-03-13'
#>   - id: twyx_D7n8bpcxf
#>     label: Then we start learning from ourselves.
#>     description: ''
#>     type: ''
#>     justification: ''
#>     date: '2023-03-13'
#>   
#> ---