diff --git a/docs/articles/citation.html b/docs/articles/citation.html index ff2d757..2466b46 100644 --- a/docs/articles/citation.html +++ b/docs/articles/citation.html @@ -110,8 +110,8 @@
  • You can export a .bib file from most reference manager programs; the free, open-source reference manager Zotero is excellent and user-friendly, and highly interoperable with other commercial reference -managers. Here -is a tutorial for using Zotero with RMarkdown.
  • +managers. Seaching for “How to Integrate Zotero Citations with R +Markdown” will yield tutorials for using Zotero with RMarkdown.
  • Alternatively, it is possible to make this file by hand, copy and pasting each new reference below the previous one; e.g., Figure @ref(fig:scholarbib) shows how to obtain a BibTeX reference from Google diff --git a/docs/articles/workflow.html b/docs/articles/workflow.html index bb2a17b..8582785 100644 --- a/docs/articles/workflow.html +++ b/docs/articles/workflow.html @@ -420,7 +420,8 @@

    Notes for cautious researchersGit Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License. The OSF logo is licensed under CC0 1.0 -Universal. Icons in the workflow graph are obtained from Flaticon; see detailed +Universal. Icons in the workflow graph are obtained from Flaticon; see +detailed attribution.

    diff --git a/docs/news/index.html b/docs/news/index.html index 440244b..5450cc8 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -60,6 +60,7 @@

    worcs 0.1.15

    • Add integration with the targets package
    • +
    • Stricter enforcement of “.Rmd” case in filenames to avoid Linux errors

    worcs 0.1.14

    CRAN release: 2023-10-25

    diff --git a/docs/reference/load_data.html b/docs/reference/load_data.html index 486d2b2..e65ce81 100644 --- a/docs/reference/load_data.html +++ b/docs/reference/load_data.html @@ -316,7 +316,7 @@

    Examples#> } #> invisible(names) #> } -#> <bytecode: 0x000001ca2088e470> +#> <bytecode: 0x000002b806d97660> #> <environment: namespace:utils> rm("data") #> Warning: object 'data' not found @@ -481,7 +481,7 @@

    Examples#> } #> invisible(names) #> } -#> <bytecode: 0x000001ca2088e470> +#> <bytecode: 0x000002b806d97660> #> <environment: namespace:utils> setwd(old_wd) unlink(test_dir, recursive = TRUE) diff --git a/docs/reference/worcs_badge.html b/docs/reference/worcs_badge.html index d3c29fc..7bdd619 100644 --- a/docs/reference/worcs_badge.html +++ b/docs/reference/worcs_badge.html @@ -109,7 +109,7 @@

    Value

    Examples

    example_dir <- file.path(tempdir(), "badge")
     dir.create(example_dir)
    -#> Warning: 'C:\Users\vanlissa\AppData\Local\Temp\RtmpGEycu6\badge' already exists
    +#> Warning: 'C:\Users\vanlissa\AppData\Local\Temp\RtmpcP5twp\badge' already exists
     write("a", file.path(example_dir, ".worcs"))
     worcs_badge(path = example_dir,
     update_readme = NULL)
    diff --git a/docs/reference/worcs_project.html b/docs/reference/worcs_project.html
    index 3bd68b0..1c4ff37 100644
    --- a/docs/reference/worcs_project.html
    +++ b/docs/reference/worcs_project.html
    @@ -164,216 +164,14 @@ 

    Examples add_license = "None", use_renv = FALSE, remote_repo = "https") -#> Called from: worcs_project(file.path(tempdir(), the_test, "worcs_project"), -#> manuscript = "github_document", preregistration = "None", -#> add_license = "None", use_renv = FALSE, remote_repo = "https") -#> debug at C:/git_repositories/worcs/R/worcs_project.R#68: cl <- match.call(expand.dots = FALSE) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#71: manuscript <- tolower(manuscript) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#73: if (manuscript == "target_markdown") use_targets <- TRUE -#> debug at C:/git_repositories/worcs/R/worcs_project.R#74: preregistration <- tolower(preregistration) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#75: add_license <- tolower(add_license) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#76: dots <- list(...) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#78: dir.create(path, recursive = TRUE, showWarnings = FALSE) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#79: path <- normalizePath(path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#81: use_git <- has_git() -#> debug at C:/git_repositories/worcs/R/worcs_project.R#82: if (!use_git) { -#> col_message("Could not find a working installation of 'Git', which is required to safeguard the transparency and reproducibility of your project. Please connect 'Git' by following the steps described in this vignette:\n vignette('setup', package = 'worcs')", -#> success = FALSE) -#> } else { -#> col_message("Initializing 'Git' repository.", verbose = verbose) -#> git_init(path = path) -#> } -#> debug at C:/git_repositories/worcs/R/worcs_project.R#85: col_message("Initializing 'Git' repository.", verbose = verbose) #> Initializing 'Git' repository. -#> debug at C:/git_repositories/worcs/R/worcs_project.R#86: git_init(path = path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#90: tryCatch({ -#> write_worcsfile(filename = file.path(path, ".worcs"), worcs_version = as.character(packageVersion("worcs")), -#> creator = Sys.info()["effective_user"]) -#> col_message("Writing '.worcs' file.", verbose = verbose) -#> }, error = function(e) { -#> col_message("Writing '.worcs' file.", success = FALSE) -#> }) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#91: write_worcsfile(filename = file.path(path, ".worcs"), worcs_version = as.character(packageVersion("worcs")), -#> creator = Sys.info()["effective_user"]) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#95: col_message("Writing '.worcs' file.", verbose = verbose) #> Writing '.worcs' file. -#> debug at C:/git_repositories/worcs/R/worcs_project.R#102: tryCatch({ -#> copy_resources(which_files = c("README.md", "prepare_data.R", -#> "worcs_icon.png"), path = path) -#> col_message("Copying standard files.", verbose = verbose) -#> }, error = function(e) { -#> col_message("Copying standard files.", success = FALSE) -#> }) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#103: copy_resources(which_files = c("README.md", "prepare_data.R", -#> "worcs_icon.png"), path = path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#108: col_message("Copying standard files.", verbose = verbose) #> Copying standard files. -#> debug at C:/git_repositories/worcs/R/worcs_project.R#117: switch(manuscript, none = { -#> write_as_utf(recommend_data, file.path(path, "run_me.R")) -#> write_worcsfile(filename = file.path(path, ".worcs"), entry_point = "run_me.R", -#> modify = TRUE) -#> add_recipe(worcs_directory = path, recipe = "source('run_me.R')") -#> }, { -#> cl[[1L]] <- quote(worcs::add_manuscript) -#> names(cl)[which(names(cl) == "path")] <- "worcs_directory" -#> eval(cl, parent.frame()) -#> add_recipe(worcs_directory = path) -#> }) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#130: cl[[1L]] <- quote(worcs::add_manuscript) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#131: names(cl)[which(names(cl) == "path")] <- "worcs_directory" -#> debug at C:/git_repositories/worcs/R/worcs_project.R#132: eval(cl, parent.frame()) #> Creating manuscript files. -#> debug at C:/git_repositories/worcs/R/worcs_project.R#133: add_recipe(worcs_directory = path) #> Adding recipe to '.worcs'. -#> debug at C:/git_repositories/worcs/R/worcs_project.R#140: if (!preregistration == "none") { -#> cl[[1L]] <- quote(worcs::add_preregistration) -#> names(cl)[which(names(cl) == "path")] <- "worcs_directory" -#> eval(cl, parent.frame()) -#> } -#> debug at C:/git_repositories/worcs/R/worcs_project.R#148: if (!add_license == "none") { -#> tryCatch({ -#> dir.create(path, recursive = TRUE, showWarnings = FALSE) -#> license_dir = system.file("rstudio", "templates", "project", -#> "licenses", package = "worcs", mustWork = TRUE) -#> license_file <- file.path(license_dir, paste0(add_license, -#> ".txt")) -#> file.copy(license_file, file.path(path, "LICENSE"), copy.mode = FALSE) -#> col_message("Writing license file.", verbose = verbose) -#> }, error = function(e) { -#> col_message("Writing license file.", success = FALSE) -#> }) -#> } -#> debug at C:/git_repositories/worcs/R/worcs_project.R#165: if (use_targets) { -#> if (require("targets", quietly = TRUE) & require("tarchetypes", -#> quietly = TRUE)) { -#> worcs::add_targets(worcs_directory = path, verbose = verbose) -#> col_message("Initializing 'targets' for a Make-like pipeline.", -#> verbose = verbose) -#> } -#> } -#> debug at C:/git_repositories/worcs/R/worcs_project.R#179: if (use_renv) { -#> tryCatch({ -#> init_fun <- get("init", asNamespace("renv")) -#> do.call(init_fun, list(project = path, restart = FALSE)) -#> col_message("Initializing 'renv' for a reproducible R environment.", -#> verbose = verbose) -#> }, error = function(e) { -#> col_message("Initializing 'renv' for a reproducible R environment.", -#> success = FALSE) -#> }) -#> } -#> debug at C:/git_repositories/worcs/R/worcs_project.R#191: write(c(".Rhistory", ".Rprofile", "*.csv", "*.sav", "*.sas7bdat", -#> "*.xlsx", "*.xls", "*.pdf", "*.fff", "*.log", "*.tex"), file = file.path(path, -#> ".gitignore"), append = TRUE) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#205: if (file.exists(file.path(path, "README.md"))) { -#> cont <- readLines(file.path(path, "README.md"), encoding = "UTF-8") -#> f <- list.files(path) -#> tab <- matrix(c("File", "Description", "Usage", "README.md", -#> "Description of project", "Human editable"), nrow = 2, -#> byrow = TRUE) -#> rproj_name <- paste0(basename(path), ".Rproj") -#> cont[which(startsWith(cont, "You can load this project in RStudio by opening the file"))] <- paste0("You can load this project in RStudio by opening the file called '", -#> rproj_name, "'.") -#> tab <- rbind(tab, c(rproj_name, "Project file", "Loads project")) -#> tab <- describe_file("LICENSE", "User permissions", "Read only", -#> tab, path) -#> tab <- describe_file(".worcs", "WORCS metadata YAML", "Read only", -#> tab, path) -#> tab <- describe_file("preregistration.rmd", "Preregistered hypotheses", -#> "Human editable", tab, path) -#> tab <- describe_file("prepare_data.R", "Script to process raw data", -#> "Human editable", tab, path) -#> tab <- describe_file("manuscript/manuscript.rmd", "Source code for paper", -#> "Human editable", tab, path) -#> tab <- describe_file("manuscript/references.bib", "BibTex references for manuscript", -#> "Human editable", tab, path) -#> tab <- describe_file("renv.lock", "Reproducible R environment", -#> "Read only", tab, path) -#> tab <- nice_tab(tab) -#> cont <- append(cont, tab, after = grep("You can add rows to this table", -#> cont)) -#> write_as_utf(cont, file.path(path, "README.md")) -#> } -#> debug at C:/git_repositories/worcs/R/worcs_project.R#206: cont <- readLines(file.path(path, "README.md"), encoding = "UTF-8") -#> debug at C:/git_repositories/worcs/R/worcs_project.R#207: f <- list.files(path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#208: tab <- matrix(c("File", "Description", "Usage", "README.md", -#> "Description of project", "Human editable"), nrow = 2, byrow = TRUE) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#210: rproj_name <- paste0(basename(path), ".Rproj") -#> debug at C:/git_repositories/worcs/R/worcs_project.R#211: cont[which(startsWith(cont, "You can load this project in RStudio by opening the file"))] <- paste0("You can load this project in RStudio by opening the file called '", -#> rproj_name, "'.") -#> debug at C:/git_repositories/worcs/R/worcs_project.R#212: tab <- rbind(tab, c(rproj_name, "Project file", "Loads project")) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#213: tab <- describe_file("LICENSE", "User permissions", "Read only", -#> tab, path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#214: tab <- describe_file(".worcs", "WORCS metadata YAML", "Read only", -#> tab, path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#215: tab <- describe_file("preregistration.rmd", "Preregistered hypotheses", -#> "Human editable", tab, path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#216: tab <- describe_file("prepare_data.R", "Script to process raw data", -#> "Human editable", tab, path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#217: tab <- describe_file("manuscript/manuscript.rmd", "Source code for paper", -#> "Human editable", tab, path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#218: tab <- describe_file("manuscript/references.bib", "BibTex references for manuscript", -#> "Human editable", tab, path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#219: tab <- describe_file("renv.lock", "Reproducible R environment", -#> "Read only", tab, path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#221: tab <- nice_tab(tab) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#222: cont <- append(cont, tab, after = grep("You can add rows to this table", -#> cont)) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#223: write_as_utf(cont, file.path(path, "README.md")) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#227: if (use_git) { -#> tryCatch({ -#> git_add(files = "README.md", repo = path) -#> git_commit(message = "worcs template initial commit", -#> repo = path) -#> col_message("Creating first commit (committing README.md).", -#> verbose = verbose) -#> }, error = function(e) { -#> col_message("Creating first commit (committing README.md).", -#> success = FALSE) -#> }) -#> } -#> debug at C:/git_repositories/worcs/R/worcs_project.R#228: tryCatch({ -#> git_add(files = "README.md", repo = path) -#> git_commit(message = "worcs template initial commit", repo = path) -#> col_message("Creating first commit (committing README.md).", -#> verbose = verbose) -#> }, error = function(e) { -#> col_message("Creating first commit (committing README.md).", -#> success = FALSE) -#> }) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#229: git_add(files = "README.md", repo = path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#230: git_commit(message = "worcs template initial commit", repo = path) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#231: col_message("Creating first commit (committing README.md).", -#> verbose = verbose) #> Creating first commit (committing README.md). -#> debug at C:/git_repositories/worcs/R/worcs_project.R#238: repo_url <- parse_repo(remote_repo = remote_repo, verbose = verbose) #> Not a valid 'Git' remote repository address: https -#> debug at C:/git_repositories/worcs/R/worcs_project.R#239: valid_repo <- !is.null(repo_url) -#> debug at C:/git_repositories/worcs/R/worcs_project.R#240: if (use_git & valid_repo) { -#> tryCatch({ -#> Args_gert <- list("origin", url = remote_repo, repo = path) -#> if ("remote" %in% formalArgs(git_remote_add)) { -#> names(Args_gert)[1] <- "remote" -#> } -#> else { -#> names(Args_gert)[1] <- "name" -#> } -#> do.call(git_remote_add, Args_gert) -#> git_push(remote = "origin", repo = path) -#> col_message(paste0("Connected to remote repository at ", -#> remote_repo), verbose = verbose) -#> }, error = function(e) { -#> col_message("Could not connect to a remote 'GitHub' repository. You are working with a local 'Git' repository only.", -#> success = FALSE, verbose = verbose) -#> }) -#> } else { -#> col_message("No valid 'GitHub' address provided. You are working with a local 'Git' repository only.", -#> success = FALSE) -#> } -#> debug at C:/git_repositories/worcs/R/worcs_project.R#260: col_message("No valid 'GitHub' address provided. You are working with a local 'Git' repository only.", -#> success = FALSE) #> No valid 'GitHub' address provided. You are working with a local 'Git' repository only. -#> debug at C:/git_repositories/worcs/R/worcs_project.R#262: if ("GCtorture" %in% ls()) rm("GCtorture") setwd(old_wd) unlink(file.path(tempdir(), the_test))

    diff --git a/docs/search.json b/docs/search.json index ac4fbc4..e7d731d 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -[{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"adding-endpoints","dir":"Articles","previous_headings":"","what":"Adding endpoints","title":"Using Endpoints to Check Reproducibility","text":"Users can add endpoints using function add_endpoint(\"filename\"). running function, filename added .worcs project file, checksum computed changes contents file can detected. also possible specify multiple endpoints. example, maybe user finalized analyses, wants track reproducibility analysis results - still wants make changes text manuscript without breaking reproducibility checks. case, useful track files contain analysis results instead rendered manuscript. Imagine intermediary files analysis results: descriptives.csv: file descriptive statistics study variables model_fit.csv: table model fit indices several models finalmodel.RData: RData file results final model three files tracked endpoints calling add_endpoint(\"descriptives.csv\"); add_endpoint(\"model_fit.csv\"); add_endpoint(\"finalmodel.RData\").","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"reproducing-a-project","dir":"Articles","previous_headings":"","what":"Reproducing a Project","title":"Using Endpoints to Check Reproducibility","text":"WORCS project can reproduced evaluating function reproduce(). function evaluates recipe defined .worcs project file. recipe specified (e.g., project created older version package), entry point defined, reproduce() try evaluate entry point Rmarkdown R source file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"checking-reproducibility","dir":"Articles","previous_headings":"","what":"Checking reproducibility","title":"Using Endpoints to Check Reproducibility","text":"Users can verify endpoint remains unchanged reproducing project calling function check_endpoints(). endpoint changed relative version stored .worcs project file, result warning message.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"updating-endpoints","dir":"Articles","previous_headings":"","what":"Updating endpoints","title":"Using Endpoints to Check Reproducibility","text":"update endpoints .worcs file, call snapshot_endpoints(). Always call function log changes code result different end result.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"automating-reproducibility","dir":"Articles","previous_headings":"","what":"Automating Reproducibility","title":"Using Endpoints to Check Reproducibility","text":"project connected remote repository GitHub, possible use GitHub actions automatically check project’s reproducibility signal result reproducibility check displaying badge project’s readme page (welcome page visitors GitHub repository first see). , follow steps: Add endpoint using add_endpoint(); example, endpoint analyses file called 'manuscript/manuscript.md', call add_endpoint('manuscript/manuscript.md') Run github_action_reproduce() [![worcs_endpoints](https://github.com/YOUR_ACCOUNT/PROJECT_REPOSITORY/actions/workflows/worcs_reproduce.yaml/badge.svg)](https://github.com/YOUR_ACCOUNT/PROJECT_REPOSITORY/actions/worcs_reproduce.yaml/worcs_endpoints.yaml) Commit changes GitHub using git_update() Visit project page GitHub select Actions tab see reproducibility check running; visit main project page see new badge readme.md file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"automating-endpoint-checks","dir":"Articles","previous_headings":"","what":"Automating Endpoint Checks","title":"Using Endpoints to Check Reproducibility","text":"Sometimes, may wish verify endpoints project remain without reproducing analyses GitHub’s servers. may case project closed data available GitHub, analyses take long time compute want prevent using unnecessary compute power (e.g., environmental reasons). cases, can still use GitHub actions automatically check whether endpoints remained unchanged. local changes project introduce deviations endpoint snapshots, tests fail. make intentional changes endpoints, course run snapshot_endpoints(). can display badge project’s readme page signal endpoints remain unchanged. , follow steps: Add endpoint using add_endpoint(); example, endpoint analyses file called 'manuscript/manuscript.md', call add_endpoint('manuscript/manuscript.md') Run github_action_check_endpoints() [![worcs_endpoints](https://github.com/YOUR_ACCOUNT/PROJECT_REPOSITORY/actions/workflows/worcs_endpoints.yaml/badge.svg)](https://github.com/YOUR_ACCOUNT/PROJECT_REPOSITORY/actions/workflows/worcs_endpoints.yaml) Commit changes GitHub using git_update() Visit project page GitHub select Actions tab see reproducibility check running; visit main project page see new badge readme.md file.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/articles/git_cloud.html","id":"setup-steps-do-this-only-once","dir":"Articles","previous_headings":"GitLab","what":"Setup steps (do this only once)","title":"Connecting to 'Git' remote repositories","text":"‘GitLab’ website looks feels almost identical ‘GitHub’. Steps 4 5 setup vignette can applied nearly without alterations. connect worcs ‘GitLab’, proceeded follows: Go gitlab.com click Register now. Choose “Individual”, “Free” plan. Request free academic upgrade. Open ‘RStudio’, open Tools menu, click Global Options, click Git/SVN Verify Enable version control interface RStudio projects selected Verify Git executable: shows location git.exe. missing, manually fix location file. Click Create RSA Key. enter passphrase. Press Create. window information open, can close. Click View public key, copy entire text clipboard. Close ‘RStudio’ (might offer restart ; fine) Go gitlab.com Click user icon top right screen, click Settings settings page, click SSH Keys left sidebar Copy-paste public key clipboard box labeled Key. Click Add key. Open ‘RStudio’ (unless restarted )","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/git_cloud.html","id":"connect-new-worcs-project-to-gitlab","dir":"Articles","previous_headings":"GitLab","what":"Connect new worcs project to ‘GitLab’","title":"Connecting to 'Git' remote repositories","text":"create new project ‘GitLab’, go account page, click Create project tile middle screen. Fill Project name; change anything else. Click green Create project button. see page titled “repository project empty”. header “Create new repository”, can see web address starting https, like :git clone https://gitlab.com/yourname/yourrepo.git Copy address, https:// .git. Paste address New project dialog window.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/articles/git_cloud.html","id":"setup-steps-do-this-only-once-1","dir":"Articles","previous_headings":"Bitbucket","what":"Setup steps (do this only once)","title":"Connecting to 'Git' remote repositories","text":"‘Bitbucket’ website cosmetic differences ‘GitHub’, works similarly. Steps 4 5 setup vignette can applied nearly without alterations. connect worcs ‘Bitbucket’, proceeded follows: Go Bitbucket website click Get started free. Follow steps create account. Sign . Bitbucket largely automated process awarding free academic upgrades. email address recognized belonging academic institution, can fill form request upgrade manually. Open ‘RStudio’, open Tools menu, click Global Options, click Git/SVN Verify Enable version control interface RStudio projects selected Verify Git executable: shows location git.exe. missing, manually fix location file. Click Create RSA Key. enter passphrase. Press Create. window information open, can close. Click View public key, copy entire text clipboard. Close ‘RStudio’ (might offer restart ; fine) Go Bitbucket website bottom left screen, click circular icon initials. Select Personal settings settings page, click SSH Keys left sidebar Click Add key Copy-paste public key clipboard box labeled Key, give label. Click Add key button. Open ‘RStudio’ (unless restarted )","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/git_cloud.html","id":"connect-new-worcs-project-to-bitbucket","dir":"Articles","previous_headings":"Bitbucket","what":"Connect new worcs project to ‘Bitbucket’","title":"Connecting to 'Git' remote repositories","text":"create new project ‘Bitbucket’, go account page, click Create repository middle page. steps differ somewhat procedure ‘GitHub’: Enter Project name Repository name. latter used connect worcs project. Important: Change setting Include README? . Click “Create repository” project page opens, see tagline “Let’s put bits bucket”. Change dropdown menu Just tagline SSH https. show web address starting https, like :git clone https://yourname@bitbucket.org/yourrepo.git Copy address, https:// .git. Paste address New project dialog window.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"install-rstudio-and-r","dir":"Articles","previous_headings":"","what":"Install ‘RStudio’ and ‘R’","title":"Reproducing a WORCS project","text":"can skip steps recent working installation ‘RStudio’ ‘R’. Install R (free) Install ‘RStudio’ Desktop (Free)","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"install-r-package-dependencies","dir":"Articles","previous_headings":"","what":"Install R-package dependencies","title":"Reproducing a WORCS project","text":"receive error saying package called [package name], run code install.packages(\"package name\") prompted update packages, just press [ENTER] avoid updating packages. Updating packages way interactive session sometimes leads errors packages loaded. see pop-dialog asking want install sources package needs compilation?, click .","code":"install.packages(\"worcs\", dependencies = TRUE) tinytex::install_tinytex() renv::consent(provided = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"obtaining-the-project-repository","dir":"Articles","previous_headings":"","what":"Obtaining the project repository","title":"Reproducing a WORCS project","text":"WORCS projects typically hosted ‘GitHub’, another ‘Git’ remote repository. recommended way obtain local copy project repository “clone” . ‘GitHub’, done clicking green button labeled “Code”. Clicking reveals HTTPS link project repository (see ). Copy link clipboard clicking clipboard icon next . Next, open RStudio instance run following code console, replacing https://github.com/username/reponame.git HTTPS address just copied clipboard, replacing c:///want//repo location hard drive want clone repository: Note: also possible download compressed (ZIP) archive containing project (see image ), important limitation: repository downloaded via GitHub interface , , Git repository! peculiarity GitHub interface. might result unexpected behavior using WORCS functionality relies Git version control. Thus, general rule, advise cloning projects instead.","code":"gert::git_clone(\"https://github.com/username/reponame.git\", path = \"c:/where/you/want/the/repo\")"},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"open-the-project-in-rstudio","dir":"Articles","previous_headings":"","what":"Open the project in ‘RStudio’","title":"Reproducing a WORCS project","text":"projects can opened loading ‘.RProj’ file main folder. explained project ‘README.md’ well.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"restore-the-package-dependencies","dir":"Articles","previous_headings":"","what":"Restore the package dependencies","title":"Reproducing a WORCS project","text":"need restore packages used authors, using renv package. See article information renv. project open ‘RStudio’, type following console:","code":"renv::restore()"},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"open-the-project-entry-point","dir":"Articles","previous_headings":"","what":"Open the project entry point","title":"Reproducing a WORCS project","text":"entry point core document can executed reproduce analysis. typically manuscript, occasionally R-script file. Use following function open entry point file ‘RStudio’:","code":"load_entrypoint()"},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"reproduce-the-analyses","dir":"Articles","previous_headings":"","what":"Reproduce the analyses","title":"Reproducing a WORCS project","text":"worcs version 0.1.12, projects can reproduced using function reproduce(). function evaluate reproducibility recipe stored .worcs project file, checks whether resulting endpoints correct checksums (.e., unchanged relative authors’ original work).","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"no-access-to-original-data","dir":"Articles","previous_headings":"","what":"No access to original data","title":"Reproducing a WORCS project","text":"Sometimes, authors made original data available. case, project contain synthetic data file similar properties original data. synthetic data allows verify analyses can run, code correct. results , however, deviate original findings substantively interpreted. Authors may use function notify_synthetic() generate message paper synthetic dataset used. Authors also provide information README.md file obtain access original data case audit warranted. Please read WORCS paper [@vanlissaWORCSWorkflowOpen2021] information checksums used auditors can verify authenticity original data.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/setup.html","id":"optional-step","dir":"Articles","previous_headings":"","what":"Optional step","title":"Setting up your computer for WORCS","text":"intend write documents APA style, additionally install papaja package. papaja many dependencies, recommended skip step intend write documents different style APA. Unfortunately, package yet available central R repository CRAN, can install ‘GitHub’ using following code:","code":"install.packages(\"papaja\", dependencies = TRUE, update = \"never\")"},{"path":"https://cjvanlissa.github.io/worcs/articles/synthetic_data.html","id":"generating-data-from-a-structural-equation-model","dir":"Articles","previous_headings":"","what":"Generating Data from a Structural Equation Model","title":"Using Custom Synthetic Data","text":"Structural equation models may problems converging estimated synthetic datasets. avoid problem, synthetic data can generated directly SEM model. Generating data SEM model often result synthetic dataset closely reproduce model parameters estimated original dataset.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/synthetic_data.html","id":"illustrating-the-problem","dir":"Articles","previous_headings":"Generating Data from a Structural Equation Model","what":"Illustrating the Problem","title":"Using Custom Synthetic Data","text":"example, use PoliticalDemocracy data included lavaan package. Imagine collected data, allowed share . existing worcs project, store using command: Now, estimate SEM-model, based example lavaan documentation: work fine. someone tries reproduce analysis? access original data, synthetic dataset. simulate experience reproducing analysis, can load synthetic dataset try run model: result several warnings, negative latent variable variances (impossibility) warning observed covariance matrix residuals positive definite. words: model fit synthetic data, structure data adequately reproduced default algorithm synthetic().","code":"library(lavaan) library(tidySEM) set.seed(4) dat <- PoliticalDemocracy closed_data(dat) load_data() model <- ' ind60 =~ x1 + x2 + x3 dem60 =~ y1 + a*y2 + b*y3 + c*y4 dem65 =~ y5 + a*y6 + b*y7 + c*y8 # regressions dem60 ~ ind60 dem65 ~ ind60 + dem60 # residual correlations y1 ~~ y5 y2 ~~ y4 + y6 y3 ~~ y7 y4 ~~ y8 y6 ~~ y8' fit <- lavaan::sem(model, data = dat) tidySEM::table_results(fit) #> label est_sig se pval confint #> 1 ind60.BY.x1 1.00 0.00 [1.00, 1.00] #> 2 ind60.BY.x2 2.18*** 0.14 0.00 [1.91, 2.45] #> 3 ind60.BY.x3 1.82*** 0.15 0.00 [1.52, 2.12] #> 4 dem60.BY.y1 1.00 0.00 [1.00, 1.00] #> 5 dem60.BY.y2 1.19*** 0.14 0.00 [0.92, 1.46] #> 6 dem60.BY.y3 1.17*** 0.12 0.00 [0.94, 1.41] #> 7 dem60.BY.y4 1.25*** 0.12 0.00 [1.02, 1.48] #> 8 dem65.BY.y5 1.00 0.00 [1.00, 1.00] #> 9 dem65.BY.y6 1.19*** 0.14 0.00 [0.92, 1.46] #> 10 dem65.BY.y7 1.17*** 0.12 0.00 [0.94, 1.41] #> 11 dem65.BY.y8 1.25*** 0.12 0.00 [1.02, 1.48] #> 12 dem60.ON.ind60 1.47*** 0.39 0.00 [0.70, 2.24] #> 13 dem65.ON.ind60 0.60** 0.23 0.01 [0.16, 1.04] #> 14 dem65.ON.dem60 0.87*** 0.07 0.00 [0.72, 1.01] #> 15 y1.WITH.y5 0.58 0.36 0.10 [-0.11, 1.28] #> 16 y2.WITH.y4 1.44* 0.69 0.04 [0.09, 2.79] #> 17 y2.WITH.y6 2.18** 0.74 0.00 [0.74, 3.63] #> 18 y3.WITH.y7 0.71 0.61 0.24 [-0.49, 1.91] #> 19 y4.WITH.y8 0.36 0.44 0.41 [-0.51, 1.23] #> 20 y6.WITH.y8 1.37* 0.58 0.02 [0.24, 2.50] #> 21 Variances.x1 0.08*** 0.02 0.00 [0.04, 0.12] #> 22 Variances.x2 0.12 0.07 0.08 [-0.02, 0.26] #> 23 Variances.x3 0.47*** 0.09 0.00 [0.29, 0.64] #> 24 Variances.y1 1.85*** 0.43 0.00 [1.01, 2.70] #> 25 Variances.y2 7.58*** 1.37 0.00 [4.90, 10.26] #> 26 Variances.y3 4.96*** 0.96 0.00 [3.08, 6.83] #> 27 Variances.y4 3.22*** 0.72 0.00 [1.81, 4.64] #> 28 Variances.y5 2.31*** 0.48 0.00 [1.37, 3.25] #> 29 Variances.y6 4.97*** 0.92 0.00 [3.16, 6.77] #> 30 Variances.y7 3.56*** 0.71 0.00 [2.17, 4.95] #> 31 Variances.y8 3.31*** 0.70 0.00 [1.93, 4.69] #> 32 Variances.ind60 0.45*** 0.09 0.00 [0.28, 0.62] #> 33 Variances.dem60 3.88*** 0.87 0.00 [2.18, 5.57] #> 34 Variances.dem65 0.16 0.23 0.47 [-0.28, 0.61] dat2 <- read.csv(\"synthetic_dat.csv\", stringsAsFactors = FALSE) fit2 <- lavaan::sem(model, data = dat2) #> Warning: lavaan->lav_object_post_check(): #> some estimated lv variances are negative #> Warning: lavaan->lav_object_post_check(): #> the covariance matrix of the residuals of the observed variables (theta) #> is not positive definite ; use lavInspect(fit, \"theta\") to investigate."},{"path":"https://cjvanlissa.github.io/worcs/articles/synthetic_data.html","id":"adding-a-custom-dataset","dir":"Articles","previous_headings":"Generating Data from a Structural Equation Model","what":"Adding a Custom Dataset","title":"Using Custom Synthetic Data","text":"dataset generated model much better able reproduce model. , let’s use SEM model generate synthetic dataset: Note function simulateData() accepts parameter table argument, must first extracted fitted model object using partable(). add custom synthetic dataset original dataset, use function . Note original_name reference file name data synthetic dataset associated , name R-object. started R-object called dat, saved file called dat.csv using function closed_data(). now remove original data, call load_data() , can verify synthetic dataset loaded, can see ’s possible reproduce analysis - exact results - :","code":"set.seed(33) dat_synthetic <- lavaan::simulateData(model = lavaan::partable(fit)) add_synthetic(dat_synthetic, original_name = \"dat.csv\") file.remove(\"dat.csv\") load_data() fit2 <- lavaan::sem(model, data = dat) tidySEM::table_results(fit2) #> [1] TRUE #> label est_sig se pval confint #> 1 ind60.BY.x1 1.00 0.00 [1.00, 1.00] #> 2 ind60.BY.x2 2.15*** 0.05 0.00 [2.05, 2.25] #> 3 ind60.BY.x3 1.78*** 0.06 0.00 [1.67, 1.90] #> 4 dem60.BY.y1 1.00 0.00 [1.00, 1.00] #> 5 dem60.BY.y2 1.15*** 0.05 0.00 [1.06, 1.25] #> 6 dem60.BY.y3 1.13*** 0.04 0.00 [1.04, 1.21] #> 7 dem60.BY.y4 1.13*** 0.04 0.00 [1.05, 1.21] #> 8 dem65.BY.y5 1.00 0.00 [1.00, 1.00] #> 9 dem65.BY.y6 1.15*** 0.05 0.00 [1.06, 1.25] #> 10 dem65.BY.y7 1.13*** 0.04 0.00 [1.04, 1.21] #> 11 dem65.BY.y8 1.13*** 0.04 0.00 [1.05, 1.21] #> 12 dem60.ON.ind60 1.51*** 0.16 0.00 [1.20, 1.82] #> 13 dem65.ON.ind60 0.75*** 0.09 0.00 [0.57, 0.93] #> 14 dem65.ON.dem60 0.86*** 0.03 0.00 [0.80, 0.91] #> 15 y1.WITH.y5 0.52*** 0.14 0.00 [0.25, 0.79] #> 16 y2.WITH.y4 1.79*** 0.26 0.00 [1.27, 2.30] #> 17 y2.WITH.y6 1.74*** 0.24 0.00 [1.26, 2.22] #> 18 y3.WITH.y7 0.80** 0.24 0.00 [0.32, 1.28] #> 19 y4.WITH.y8 0.53*** 0.16 0.00 [0.21, 0.84] #> 20 y6.WITH.y8 1.46*** 0.21 0.00 [1.04, 1.88] #> 21 Variances.x1 0.07*** 0.01 0.00 [0.06, 0.08] #> 22 Variances.x2 0.10*** 0.02 0.00 [0.06, 0.15] #> 23 Variances.x3 0.48*** 0.03 0.00 [0.41, 0.55] #> 24 Variances.y1 1.83*** 0.18 0.00 [1.48, 2.17] #> 25 Variances.y2 6.85*** 0.48 0.00 [5.90, 7.80] #> 26 Variances.y3 5.22*** 0.39 0.00 [4.46, 5.98] #> 27 Variances.y4 3.33*** 0.27 0.00 [2.80, 3.87] #> 28 Variances.y5 1.98*** 0.17 0.00 [1.64, 2.32] #> 29 Variances.y6 4.32*** 0.32 0.00 [3.70, 4.94] #> 30 Variances.y7 3.62*** 0.28 0.00 [3.07, 4.17] #> 31 Variances.y8 3.38*** 0.27 0.00 [2.86, 3.90] #> 32 Variances.ind60 0.43*** 0.03 0.00 [0.37, 0.49] #> 33 Variances.dem60 4.10*** 0.35 0.00 [3.41, 4.79] #> 34 Variances.dem65 0.25** 0.10 0.01 [0.06, 0.44]"},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"worcs-steps-to-follow-for-a-project","dir":"Articles","previous_headings":"","what":"WORCS: Steps to follow for a project","title":"The WORCS workflow, version 0.1.6","text":"vignette describes Workflow Open Reproducible Code Science, introduced Van Lissa et al. (2021). paper describes rationale principled approach workflow based; vignette describes practical steps R-users greater detail. Note , although steps numbered reference purposes, acknowledge process conducting research always linear. workflow illustrated graph , optional steps displayed blue nodes:","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"phase-1-study-design","dir":"Articles","previous_headings":"WORCS: Steps to follow for a project","what":"Phase 1: Study design","title":"The WORCS workflow, version 0.1.6","text":"inexperienced users, recommend making repository “Private”, means selected co-authors can access . can set “Public” later - example, paper goes print - entire history Repository public record. recommend making repository “Public” start experienced user know . Copy repository link clipboard; link look something like https://github.com/username/repository.git Paste remote Repository address textbox. address look like https://github.com/username/repository.git Keep checkbox renv checked want use dependency management (recommended) Select preregistration template, add preregistration later using add_preregistration() Select manuscript template, add manuscript later using add_manuscript() Select license project (recommend CC-license, allows free use licensed material long creator credited) template README.md file automatically generated project creation. Edit template explain users interact project. Based selections New Project dialog, LICENSE also added project, explain users’ rights limit liability. recommend CC-license, allows free use licensed material long creator credited. Document study plans preregistration.Rmd file, optionally, planned analyses .R file. top-right panel ‘RStudio’, select ‘Git’ tab Select checkbox next preregistration file(s) Click Commit button. pop-window, write informative “Commit message”, e.g., “Preregistration” Click Commit button message dialog Click green arrow labeled “Push” send commit ‘Git’ remote repository Tag commit release remote repository, using label “preregistration”. tagged release helps others retrieve commit. Instructions ‘GitHub’ explained ‘RStudio’, file ‘preregistration.Rmd’ open, click “Knit” button top left panel PDF generated, go one recognized preregistration services’ websites, create new preregistration, upload attachment. Optional: Generate DOI preregistration OSF service like Zenodo study materials rights, materials’ license allows can solicit feedback outside contributions ‘Git’ remote repository opening “Issue” accepting “Pull requests”","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"phase-2-writing-and-analysis","dir":"Articles","previous_headings":"WORCS: Steps to follow for a project","what":"Phase 2: Writing and analysis","title":"The WORCS workflow, version 0.1.6","text":"Document preprocessing (“data wrangling”) procedure prepare_data.R file. file intended document steps can replicated end users, unless access raw data file. steps run , first time load data R. Make file short possible; include steps absolutely necessary WARNING: commit data file ‘Git’ repository, record retained forever (unless entire repository deleted). Assume pushing data ‘Git’ remote repository undone. Follow mantra: “Never commit something intend share”. using external data sources (e.g., obtained using API), recommended store local copy, make project portable ensure end users access version data used. Use code chunks perform analyses. first code chunk call load_data() Finish sentence one carriage return (enter); separate paragraphs double carriage return. top-right panel ‘RStudio’, select ‘Git’ tab Select checkboxes next files whose changes wish Commit Click Commit button. pop-window, write informative “Commit message”. Click Commit button message dialog Click green arrow labeled “Push” send commit remote repository writing, cite essential references one -symbol, [@essentialref2020], non-essential references double -symbol, [@@nonessential2020].","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"phase-3-submission-and-publication","dir":"Articles","previous_headings":"WORCS: Steps to follow for a project","what":"Phase 3: Submission and publication","title":"The WORCS workflow, version 0.1.6","text":"Use dependency management make computational environment fully reproducible. using renv, can save state project library (packages used) calling renv::snapshot(). updates lockfile, renv.lock. adds WORCS-badge ‘README.md’ file, rank “Fail”, “Limited”, “Open”. Reference WORCS checklist paper’s score paper. Optional: Complete additional optional items WORCS checklist hand, get “Perfect” rating. Go project’s repository Click “Settings” button Scroll bottom page; click “Make public”, follow -screen instructions OSF project page, can select License project. helps clearly communicate terms reusability project. Make sure use License selected project creation Step 3. DOI persistent identifier can used link project page. may already created project page Step 5 preregistered OSF Optionally, can generate additional DOIs specific resources like datasets. Alternatively, can connect ‘Git’ remote repository Zenodo, instead OSF, create DOIs project specific resources. Placing statement Abstract Author note means readers can find project even paper published behind paywall. link can masked blind review. open science statement indicate resources available online repository; data, code, materials, study design details, pre-registration, /comprehensive citations. guidance, see Aalbersberg et al. (2018). Example:spirit open science, online repository available XXX, contains [data/synthetic data file], analysis code, research materials used, details study design, comprehensive citations, tagged release preregistration. ‘RStudio’, file ‘manuscript.Rmd’ open, click “Knit” button top left panel retain essential citations , change front matter ‘manuscript.Rmd’ file: Change knit: worcs::cite_all knit: worcs::cite_essential Check Sherpa Romeo sure intended outlet allows publication preprints; many journals , nowadays - , worth considering outlets. Submit paper, tag commit submitted paper release, Step 4.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"notes-for-cautious-researchers","dir":"Articles","previous_headings":"WORCS: Steps to follow for a project","what":"Notes for cautious researchers","title":"The WORCS workflow, version 0.1.6","text":"researchers might want share work paper accepted publication. case, recommend creating “Private” repository Step 1, completing Steps 13-18 upon acceptance journal. Image attribution Git Logo Jason Long licensed Creative Commons Attribution 3.0 Unported License. OSF logo licensed CC0 1.0 Universal. Icons workflow graph obtained Flaticon; see detailed attribution.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"sample-worcs-projects","dir":"Articles","previous_headings":"","what":"Sample WORCS projects","title":"The WORCS workflow, version 0.1.6","text":"list sample worcs projects created authors users, see README.md file WORCS GitHub page. list regularly updated. References","code":""},{"path":"https://cjvanlissa.github.io/worcs/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Caspar J. Van Lissa. Author, maintainer. Aaron Peikert. Author. Andreas M. Brandmaier. Author.","code":""},{"path":"https://cjvanlissa.github.io/worcs/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Van Lissa CJ, Peikert , Brandmaier (2024). worcs: Workflow Open Reproducible Code Science. R package version 0.1.15, https://github.com/cjvanlissa/worcs.","code":"@Manual{, title = {worcs: Workflow for Open Reproducible Code in Science}, author = {Caspar J. {Van Lissa} and Aaron Peikert and Andreas M. Brandmaier}, year = {2024}, note = {R package version 0.1.15}, url = {https://github.com/cjvanlissa/worcs}, }"},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"worcs-","dir":"","previous_headings":"","what":"Workflow for Open Reproducible Code in Science","title":"Workflow for Open Reproducible Code in Science","text":"Workflow Open Reproducible Code Science (WORCS) easy adopt approach ensuring research project meets requirements Open Science start. based “good enough” philosophy, prioritizing user-friendliness exhaustiveness. can used either absence , parallel , existing requirements Open workflows. can also enhanced elaborate solutions specific issues.","code":""},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"where-do-i-start","dir":"","previous_headings":"","what":"Where do I start?","title":"Workflow for Open Reproducible Code in Science","text":"users, recommended starting point read paper, published Data Science, introduces WORCS workflow, explains underlying tools, illustrates worcs package can used create new project follows workflow. workflow illustrated ; workflow vignette describes step detail.","code":""},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"installing-the-package","dir":"","previous_headings":"","what":"Installing the package","title":"Workflow for Open Reproducible Code in Science","text":"installing package, please read vignette, explains set computer worcs (using CRAN version). know ’re wish install development version worcs package GitHub instead, can use:","code":"if(!requireNamespace(\"remotes\")) install.packages(\"remotes\") remotes::install_github(\"cjvanlissa/worcs\", dependencies = TRUE, update = \"never\")"},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"citing-worcs","dir":"","previous_headings":"","what":"Citing WORCS","title":"Workflow for Open Reproducible Code in Science","text":"can cite WORCS using following citation (please use citation either package, paper): Van Lissa, C. J., Brandmaier, . M., Brinkman, L., Lamprecht, ., Peikert, ., , Struiksma, M. E., & Vreede, B. (2021). WORCS: Workflow Open Reproducible Code Science. Data Science. Data Science, vol. 4, . 1, pp. 29-49. DOI: 10.3233/DS-210031.","code":""},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"about-this-repository","dir":"","previous_headings":"","what":"About this repository","title":"Workflow for Open Reproducible Code in Science","text":"repository contains following: R-package called worcs, convenience functions facilitate WORCS workflow. subfolder ./paper, source files paper describing WORCS workflow. repository serves two functions: allow users install worcs package, allow collaborators access source code package paper.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"contributing-and-contact-information","dir":"","previous_headings":"","what":"Contributing and Contact Information","title":"Workflow for Open Reproducible Code in Science","text":"always eager receive user feedback contributions help us improve workflow software. Major contributions warrant coauthorship package. Please contact lead author c.j.vanlissa@tilburguniversity.nl, : File GitHub issue feedback, bug reports feature requests Make pull request contribute code prose participating project, agree abide Contributor Code Conduct v2.0. Contributions package must adhere tidyverse style guide. contributing code, please add tests contribution tests/testthat folder, ensure tests pass GitHub Actions panel.","code":""},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Workflow for Open Reproducible Code in Science","text":"worcs logo inspired Open Science Badges Center Open Science (CC--4.0), makes use gear, services, gears, preferences, settings icon, made MD Badsha Meah www.freeicons.io (CC--3.0).","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"gnu-general-public-license","dir":"","previous_headings":"","what":"GNU GENERAL PUBLIC LICENSE","title":"NA","text":"Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. https://fsf.org/ Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"NA","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions.","title":"NA","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code.","title":"NA","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions.","title":"NA","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law.","title":"NA","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies.","title":"NA","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions.","title":"NA","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: work must carry prominent notices stating modified , giving relevant date. work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms.","title":"NA","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms.","title":"NA","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: Disclaiming warranty limiting liability differently terms sections 15 16 License; Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; Limiting use publicity purposes names licensors authors material; Declining grant rights trademark law use trade names, trademarks, service marks; Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination.","title":"NA","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies.","title":"NA","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients.","title":"NA","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents.","title":"NA","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom.","title":"NA","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License.","title":"NA","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License.","title":"NA","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty.","title":"NA","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability.","title":"NA","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16.","title":"NA","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"NA","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands `show w’ `show c’ show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see https://www.gnu.org/licenses/. GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read https://www.gnu.org/licenses/--lgpl.html.","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details."},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":null,"dir":"","previous_headings":"","what":"worcs 0.1.15","title":"worcs 0.1.15","text":"Add integration targets package","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0114","dir":"","previous_headings":"","what":"worcs 0.1.14","title":"worcs 0.1.15","text":"Fix checksum calculated indirectly (e.g., Rmarkdown code chunk) Fix error r-release-linux-x86_64 Fix documentation; replace tags tags Improve handling relative file paths worcs:::save_data()","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0113","dir":"","previous_headings":"","what":"worcs 0.1.13","title":"worcs 0.1.15","text":"Address Prof. Brian Ripley’s comment: “Packages Suggests used conditionally: see ‘Writing R Extensions’. needs corrected even missing package(s) become available. can tested checking _R_CHECK_DEPENDS_ONLY_=true.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0112","dir":"","previous_headings":"","what":"worcs 0.1.12","title":"worcs 0.1.15","text":"Add functions add_recipe() reproduce() check_worcs_installation() longer throws error rticles prereg Add defensive programming save_data() load_data() prevent errors. improvement checksums computed; instead checking Git treats line endings (breaks project longer version controlled, e.g., downloading ZIP GitHub), check files binary. Add github action reproduce repo via github actions: github_action_reproduce() Update vignette(\"Reproduce\"); advice download ZIP GitHub bad practice, ZIP longer version controlled Git.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0111","dir":"","previous_headings":"","what":"worcs 0.1.11","title":"worcs 0.1.15","text":"Checksums computed differently preceding versions, account fact Git changes end line characters breaks consistency checksums across operating systems. Add endpoint functionality: add_endpoint(), snapshot_endpoints(), check_endpoints() Add github action endpoints: github_action_check_endpoints() Improve handling relative filenames save_data() fix bug related file path codebook metadata add function report()","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0110","dir":"","previous_headings":"","what":"worcs 0.1.10","title":"worcs 0.1.15","text":"Fix breaking bug check_worcs_installation() introduced version 0.1.9 Update setup vignette reflect new GitHub authentication protocols","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-019","dir":"","previous_headings":"","what":"worcs 0.1.9","title":"worcs 0.1.15","text":"closed_data() open_data() now store factor ordered value labels YAML file Added functions data_unlabel() data_label(), respectively coerce factors integer, restore integers factors using metadata stored YAML file load_data() attempts coerce variable classes using codebook, restores ordered levels value_labels YAML file Update templates rticles prereg packages Add check_worcs_installation() function determine whether non-R-package dependencies installed correctly Update references WORCS paper Replace GitHub version papaja CRAN version Fix URLs Update rticles prereg templates Handle literal function names rticles prereg, users can use available options packages without worcs explicitly referencing functions Add arguments ‘save_expression’ ‘load_expression’ closed_data() open_data(). allows users save data different formats. ‘load_expression’ stored .worcs file, referenced load_data().","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-018","dir":"","previous_headings":"","what":"worcs 0.1.8","title":"worcs 0.1.15","text":"Declared pandoc SystemRequirements Made examples using pandoc conditional availability pandoc Functions wrap rmarkdown::render() now return NULL pandoc available","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-017","dir":"","previous_headings":"","what":"worcs 0.1.7","title":"worcs 0.1.15","text":"Fixed failing tests requested dr. Brian Ripley","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-016","dir":"","previous_headings":"","what":"worcs 0.1.6","title":"worcs 0.1.15","text":"Workflow vignette updated address reviewer comments “Data Science” New functions: add_synthetic() notify_synthetic() closed_data() longer wraps errors call synthetic(). Thus, function call fails error data synthesis fails. closed_data() now passes formal arguments synthetic() contained ‘…’ synthetic(). synthetic() now allows ‘y’ referenced ‘predict_expression’ ‘model_expression’ set NULL, thereby enabling bootstrapping. internal function worcs:::col_message() now renders status messages black print instead colored print rmarkdown::render() callstack. avoids errors knitting PDF. See https://github.com/rstudio/rmarkdown/issues/1951 error circumvented fix.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-015","dir":"","previous_headings":"","what":"worcs 0.1.5","title":"worcs 0.1.15","text":"Necessary update due breaking changes dependency gert package Add function add_preregistration() add preregistration later stage Add preregistration templates “PSS” “Secondary”","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-014","dir":"","previous_headings":"","what":"worcs 0.1.4","title":"worcs 0.1.15","text":"Fixed bugs handling filenames open_data() closed_data() codebook.Rmd name object supplied ‘data’ argument default, open_data() closed_data() now construct filenames .csv codebook.Rmd name object supplied ‘data’ argument. also means object loaded name load_data(). Add function add_manuscript() add manuscript later stage Major bugfixes worcs_badge(); function work intended. Fixed now","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-013","dir":"","previous_headings":"","what":"worcs 0.1.3","title":"worcs 0.1.15","text":"Minor bugfixes descriptives() now returns mean() instead sd() descriptives() now returns n missing README.md now correctly shows .Rproj file rticles now declared import","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-012","dir":"","previous_headings":"","what":"worcs 0.1.2","title":"worcs 0.1.15","text":"documentation updated ensure compatibility submitted version WORCS-paper. Authors references WORCS-paper updated include co-authors. Prevent git_user() engaging antisocial behavior, resetting users’ ‘Git’ credentials, adding default argument ‘overwrite = !has_git_user()’. default, function nothing ‘Git’ user credentials already exist. Bug fix load_data() ensure compatibility ‘RMarkdown’ behavior running code chunks .Rmd file directory, instead actual working directory. Bug fix cite_all() cite_essential() allow escaping literal double @. Bug fix export_project(), now respects folder structure within project, also supports relative paths ensure portability, even called different working working directory. Fixing bug required changing working directory calling zip(). change working directory immediately followed call .exit(setwd(oldwd)), line CRAN policy. .worcs file used determine existence worcs-project recursively. .worcs file now tracks entry point analyses.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-011","dir":"","previous_headings":"","what":"worcs 0.1.1","title":"worcs 0.1.15","text":"First CRAN release.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Add endpoint to WORCS project — add_endpoint","title":"Add endpoint to WORCS project — add_endpoint","text":"Add specific endpoint WORCS project file. Endpoints files expected exactly reproducible (e.g., manuscript, figure, table, et cetera). Reproducibility checked ensuring endpoint's checksum unchanged.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add endpoint to WORCS project — add_endpoint","text":"","code":"add_endpoint(filename = NULL, worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add endpoint to WORCS project — add_endpoint","text":"filename Character, indicating file tracked endpoint. Default: NULL. worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add endpoint to WORCS project — add_endpoint","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add endpoint to WORCS project — add_endpoint","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"add_endpoint\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE writeLines(\"test\", \"test.txt\") add_endpoint(\"test.txt\") #> ✔ Adding endpoint 'test.txt' to '.worcs'. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Rmarkdown manuscript — add_manuscript","title":"Add Rmarkdown manuscript — add_manuscript","text":"Adds Rmarkdown manuscript 'worcs' project.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Rmarkdown manuscript — add_manuscript","text":"","code":"add_manuscript( worcs_directory = \".\", manuscript = \"APA6\", remote_repo = NULL, verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Rmarkdown manuscript — add_manuscript","text":"worcs_directory Character, indicating directory create manuscript files. Default: '.', points current working directory. manuscript Character, indicating template use 'R Markdown' manuscript. Default: 'APA6'. Available choices include: \"APA6\", \"github_document\", \"None\" templates rticles package. See Details. remote_repo Character, 'https' link remote repository project. link form https://[...].git. link inserted draft manuscript. verbose Logical. Whether print messages console project creation. Default: TRUE ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Rmarkdown manuscript — add_manuscript","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Rmarkdown manuscript — add_manuscript","text":"Available choices include following manuscript templates: 'APA6' APA6 style template papaja package 'github_document' github_document rmarkdown package 'acm_article' acm style template rtices package 'acs_article' acs style template rtices package 'aea_article' aea style template rtices package 'agu_article' agu style template rtices package 'ajs_article' ajs style template rtices package 'amq_article' amq style template rtices package 'ams_article' ams style template rtices package 'arxiv_article' arxiv style template rtices package 'asa_article' asa style template rtices package 'bioinformatics_article' bioinformatics style template rtices package 'biometrics_article' biometrics style template rtices package 'copernicus_article' copernicus style template rtices package 'ctex_article' ctex style template rtices package 'elsevier_article' elsevier style template rtices package 'frontiers_article' frontiers style template rtices package 'glossa_article' glossa style template rtices package 'ieee_article' ieee style template rtices package 'ims_article' ims style template rtices package 'informs_article' informs style template rtices package 'iop_article' iop style template rtices package 'isba_article' isba style template rtices package 'jasa_article' jasa style template rtices package 'jedm_article' jedm style template rtices package 'joss_article' joss style template rtices package 'jss_article' jss style template rtices package 'lipics_article' lipics style template rtices package 'mdpi_article' mdpi style template rtices package 'mnras_article' mnras style template rtices package 'oup_article' oup style template rtices package 'peerj_article' peerj style template rtices package 'pihph_article' pihph style template rtices package 'plos_article' plos style template rtices package 'pnas_article' pnas style template rtices package 'rjournal_article' rjournal style template rtices package 'rsos_article' rsos style template rtices package 'rss_article' rss style template rtices package 'sage_article' sage style template rtices package 'sim_article' sim style template rtices package 'springer_article' springer style template rtices package 'tf_article' tf style template rtices package 'trb_article' trb style template rtices package 'wellcomeor_article' wellcomeor style template rtices package","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Rmarkdown manuscript — add_manuscript","text":"","code":"the_test <- \"worcs_manuscript\" old_wd <- getwd() dir.create(file.path(tempdir(), the_test)) file.create(file.path(tempdir(), the_test, \".worcs\")) #> [1] TRUE add_manuscript(file.path(tempdir(), the_test), manuscript = \"None\") #> ✔ Creating manuscript files. setwd(old_wd) unlink(file.path(tempdir(), the_test))"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Rmarkdown preregistration — add_preregistration","title":"Add Rmarkdown preregistration — add_preregistration","text":"Adds Rmarkdown preregistration template 'worcs' project.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Rmarkdown preregistration — add_preregistration","text":"","code":"add_preregistration( worcs_directory = \".\", preregistration = \"cos_prereg\", verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Rmarkdown preregistration — add_preregistration","text":"worcs_directory Character, indicating directory create manuscript files. Default: '.', points current working directory. preregistration Character, indicating template use preregistration. Default: \"cos_prereg\"; use \"None\" omit preregistration. See Details available choices. verbose Logical. Whether print messages console project creation. Default: TRUE ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Rmarkdown preregistration — add_preregistration","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Rmarkdown preregistration — add_preregistration","text":"Available choices include templates prereg package, several unique templates included worcs: 'PSS' Preregistration Sharing Software (Krypotos, Klugkist, Mertens, & Engelhard, 2019) 'Secondary' Preregistration secondary analyses (Mertens & Krypotos, 2019) 'aspredicted_prereg' aspredicted template prereg package 'brandt_prereg' brandt template prereg package 'cos_prereg' cos template prereg package 'fmri_prereg' fmri template prereg package 'prp_quant_prereg' prp_quant template prereg package 'psyquant_prereg' psyquant template prereg package 'rr_prereg' rr template prereg package 'vantveer_prereg' vantveer template prereg package","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Rmarkdown preregistration — add_preregistration","text":"","code":"the_test <- \"worcs_prereg\" old_wd <- getwd() dir.create(file.path(tempdir(), the_test)) file.create(file.path(tempdir(), the_test, \".worcs\")) #> [1] TRUE add_preregistration(file.path(tempdir(), the_test), preregistration = \"cos_prereg\") #> ✔ Creating preregistration files. setwd(old_wd) unlink(file.path(tempdir(), the_test))"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Recipe to Generate Endpoints — add_recipe","title":"Add Recipe to Generate Endpoints — add_recipe","text":"Add recipe WORCS project file generate endpoints.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Recipe to Generate Endpoints — add_recipe","text":"","code":"add_recipe( worcs_directory = \".\", recipe = \"rmarkdown::render('manuscript/manuscript.Rmd')\", terminal = FALSE, verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Recipe to Generate Endpoints — add_recipe","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' recipe Character string, indicating function call evaluate order reproduce endpoints WORCS project. terminal Logical, indicating whether evaluate recipe terminal (TRUE) R (FALSE). Defaults FALSE verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Recipe to Generate Endpoints — add_recipe","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Recipe to Generate Endpoints — add_recipe","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"add_recipe\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE writeLines(\"test\", \"test.txt\") add_recipe() #> ✔ Adding recipe to '.worcs'. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":null,"dir":"Reference","previous_headings":"","what":"Add synthetic data to WORCS project — add_synthetic","title":"Add synthetic data to WORCS project — add_synthetic","text":"function adds user-specified synthetic data resource public use WORCS project closed data.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add synthetic data to WORCS project — add_synthetic","text":"","code":"add_synthetic( data, synthetic_name = paste0(\"synthetic_\", original_name), original_name, worcs_directory = \".\", verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add synthetic data to WORCS project — add_synthetic","text":"data data.frame containing synthetic data. synthetic_name Character, naming file synthetic data written . default, prepends \"synthetic_\" original_name. original_name Character, naming existing data resource WORCS project associate synthetic data object. worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add synthetic data to WORCS project — add_synthetic","text":"Returns NULL invisibly. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add synthetic data to WORCS project — add_synthetic","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"add_synthetic\") dir.create(test_dir) setwd(test_dir) worcs:::write_worcsfile(\".worcs\") # Prepare data df <- iris[1:3, ] # Run closed_data without synthetic closed_data(df, codebook = NULL, synthetic = FALSE) #> ✔ Storing original data in 'df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. #> ✔ Storing value labels in 'value_labels_df.yml'. # Manually add synthetic add_synthetic(df, original_name = \"df.csv\") #> ✔ Storing synthetic data in 'synthetic_df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. # Remove original from file and environment file.remove(\"df.csv\") #> [1] TRUE rm(df) # See that load_data() now loads the synthetic file load_data() #> ✔ Loading synthetic data from 'synthetic_df.csv'. #> ✖ No valid codebook found. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":null,"dir":"Reference","previous_headings":"","what":"Add targets to WORCS Project — add_targets","title":"Add targets to WORCS Project — add_targets","text":"Add computational pipeline worcs project using targets tarchetypes packages (must installed). See packages extensive documentation.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add targets to WORCS Project — add_targets","text":"","code":"add_targets(worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add targets to WORCS Project — add_targets","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE ... Arguments passed targets::use_targets().","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add targets to WORCS Project — add_targets","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add targets to WORCS Project — add_targets","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"targets\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE add_targets() #> Called from: add_targets() #> debug at C:/git_repositories/worcs/R/targets.R#27: checkworcs(worcs_directory, iserror = TRUE) #> debug at C:/git_repositories/worcs/R/targets.R#28: fn_worcs <- path_abs_worcs(\".worcs\", worcs_directory) #> debug at C:/git_repositories/worcs/R/targets.R#29: if (!file.exists(fn_worcs)) { #> stop(\".worcs file not found.\") #> } #> debug at C:/git_repositories/worcs/R/targets.R#32: if (!(requireNamespace(\"targets\", quietly = TRUE) & requireNamespace(\"tarchetypes\", #> quietly = TRUE))) { #> c(requireNamespace(\"targets\", quietly = TRUE) & requireNamespace(\"tarchetypes\", #> quietly = TRUE)) #> col_message(\"Could not find required packages; please run \", #> paste0(c(c(\"install.packages('targets')\", \"\")[requireNamespace(\"targets\", #> quietly = TRUE) + 1L], c(\"install.packages('tarchetypes')\", #> \"\")[requireNamespace(\"tarchetypes\", quietly = TRUE) + #> 1L]), collapse = \"; \"), \" then try again.\", success = FALSE) #> return(invisible(FALSE)) #> } else { #> worcs_file <- yaml::read_yaml(fn_worcs) #> tryCatch({ #> if (!file.exists(file.path(worcs_directory, \"_targets.rmd\"))) { #> run_in_worcsdir(code = targets::use_targets(open = FALSE, #> ...), worcs_directory = worcs_directory) #> } #> col_message(\"Added targets to project.\") #> }, error = function(e) { #> col_message(\"Could not add targets to project.\", success = FALSE) #> }) #> if (!dir.exists(file.path(worcs_directory, \"_targets\"))) { #> dir.create(file.path(worcs_directory, \"_targets\")) #> } #> to_worcs <- list(filename = fn_worcs, modify = TRUE) #> if (file.exists(path_abs_worcs(\"run.r\", worcs_directory = worcs_directory))) { #> col_message(\"Setting entry point to 'run.r'.\", verbose = verbose) #> to_worcs$entry_point <- \"run.r\" #> to_worcs$recipe <- list(recipe = \"source('run.r')\", terminal = FALSE) #> col_message(\"Setting recipe to source('run.r').\", verbose = verbose) #> } #> else { #> to_worcs$recipe <- list(recipe = \"targets::tar_make()\", #> terminal = FALSE) #> col_message(\"Setting recipe to targets::tar_make().\", #> verbose = verbose) #> } #> do.call(write_worcsfile, to_worcs) #> if (file.exists(path_abs_worcs(\"manuscript/manuscript.rmd\", #> worcs_directory = worcs_directory)) & file.exists(path_abs_worcs(\"_targets.R\", #> worcs_directory = worcs_directory))) { #> lnz <- readLines(path_abs_worcs(\"_targets.R\", worcs_directory = worcs_directory)) #> if (all(tail(lnz, 2) == c(\" )\", \")\"))) { #> col_message(\"Adding rmarkdown manuscript to targets pipeline.\", #> verbose = verbose) #> lnz <- c(lnz[1:(length(lnz) - 2)], c(\" ),\", \" tarchetypes::tar_render(manuscript, \\\"manuscript/manuscript.rmd\\\")\", #> \")\")) #> writeLines(text = lnz, con = path_abs_worcs(\"_targets.R\", #> worcs_directory = worcs_directory)) #> } #> else { #> col_message(\"Could not add rmarkdown manuscript to targets pipeline.\", #> verbose = verbose, success = FALSE) #> } #> lnz <- readLines(path_abs_worcs(\"manuscript/manuscript.rmd\", #> worcs_directory = worcs_directory)) #> if (any(startsWith(lnz, \"```{r setup\"))) { #> col_message(\"Adding targets to rmarkdown manuscript.\", #> verbose = verbose) #> strt <- which(startsWith(lnz, \"```{r setup\")) #> endd <- which(lnz == \"```\") #> endd <- endd[endd > strt][1] #> addthis <- c(\"# Setup for targets:\", \"\", \"library(targets)\", #> \"tar_config_set(store = \\\"../_targets\\\")\", \"tar_load(model)\", #> \"# You can interact with tar objects as usual, e.g.:\", #> \"# print(model)\") #> lnz <- c(lnz[1:(endd - 1)], addthis, lnz[endd:length(lnz)]) #> writeLines(lnz, path_abs_worcs(\"manuscript/manuscript.rmd\", #> worcs_directory = worcs_directory)) #> } #> else { #> col_message(\"Could not add targets to rmarkdown manuscript.\", #> verbose = verbose, success = FALSE) #> } #> } #> if (!dir.exists(path_abs_worcs(\"r\", worcs_directory = worcs_directory))) { #> col_message(\"Creating directory './R/' for targets scripts.\", #> verbose = verbose) #> dir.create(path_abs_worcs(\"R\", worcs_directory = worcs_directory)) #> } #> } #> debug at C:/git_repositories/worcs/R/targets.R#43: worcs_file <- yaml::read_yaml(fn_worcs) #> debug at C:/git_repositories/worcs/R/targets.R#45: tryCatch({ #> if (!file.exists(file.path(worcs_directory, \"_targets.rmd\"))) { #> run_in_worcsdir(code = targets::use_targets(open = FALSE, #> ...), worcs_directory = worcs_directory) #> } #> col_message(\"Added targets to project.\") #> }, error = function(e) { #> col_message(\"Could not add targets to project.\", success = FALSE) #> }) #> debug at C:/git_repositories/worcs/R/targets.R#46: if (!file.exists(file.path(worcs_directory, \"_targets.rmd\"))) { #> run_in_worcsdir(code = targets::use_targets(open = FALSE, #> ...), worcs_directory = worcs_directory) #> } #> debug at C:/git_repositories/worcs/R/targets.R#48: run_in_worcsdir(code = targets::use_targets(open = FALSE, ...), #> worcs_directory = worcs_directory) #> ▶ Wrote _targets.R #> debug at C:/git_repositories/worcs/R/targets.R#50: col_message(\"Added targets to project.\") #> ✔ Added targets to project. #> debug at C:/git_repositories/worcs/R/targets.R#54: if (!dir.exists(file.path(worcs_directory, \"_targets\"))) { #> dir.create(file.path(worcs_directory, \"_targets\")) #> } #> debug at C:/git_repositories/worcs/R/targets.R#56: dir.create(file.path(worcs_directory, \"_targets\")) #> debug at C:/git_repositories/worcs/R/targets.R#59: to_worcs <- list(filename = fn_worcs, modify = TRUE) #> debug at C:/git_repositories/worcs/R/targets.R#61: if (file.exists(path_abs_worcs(\"run.r\", worcs_directory = worcs_directory))) { #> col_message(\"Setting entry point to 'run.r'.\", verbose = verbose) #> to_worcs$entry_point <- \"run.r\" #> to_worcs$recipe <- list(recipe = \"source('run.r')\", terminal = FALSE) #> col_message(\"Setting recipe to source('run.r').\", verbose = verbose) #> } else { #> to_worcs$recipe <- list(recipe = \"targets::tar_make()\", terminal = FALSE) #> col_message(\"Setting recipe to targets::tar_make().\", verbose = verbose) #> } #> debug at C:/git_repositories/worcs/R/targets.R#67: to_worcs$recipe <- list(recipe = \"targets::tar_make()\", terminal = FALSE) #> debug at C:/git_repositories/worcs/R/targets.R#68: col_message(\"Setting recipe to targets::tar_make().\", verbose = verbose) #> ✔ Setting recipe to targets::tar_make(). #> debug at C:/git_repositories/worcs/R/targets.R#71: do.call(write_worcsfile, to_worcs) #> debug at C:/git_repositories/worcs/R/targets.R#74: if (file.exists(path_abs_worcs(\"manuscript/manuscript.rmd\", worcs_directory = worcs_directory)) & #> file.exists(path_abs_worcs(\"_targets.R\", worcs_directory = worcs_directory))) { #> lnz <- readLines(path_abs_worcs(\"_targets.R\", worcs_directory = worcs_directory)) #> if (all(tail(lnz, 2) == c(\" )\", \")\"))) { #> col_message(\"Adding rmarkdown manuscript to targets pipeline.\", #> verbose = verbose) #> lnz <- c(lnz[1:(length(lnz) - 2)], c(\" ),\", \" tarchetypes::tar_render(manuscript, \\\"manuscript/manuscript.rmd\\\")\", #> \")\")) #> writeLines(text = lnz, con = path_abs_worcs(\"_targets.R\", #> worcs_directory = worcs_directory)) #> } #> else { #> col_message(\"Could not add rmarkdown manuscript to targets pipeline.\", #> verbose = verbose, success = FALSE) #> } #> lnz <- readLines(path_abs_worcs(\"manuscript/manuscript.rmd\", #> worcs_directory = worcs_directory)) #> if (any(startsWith(lnz, \"```{r setup\"))) { #> col_message(\"Adding targets to rmarkdown manuscript.\", #> verbose = verbose) #> strt <- which(startsWith(lnz, \"```{r setup\")) #> endd <- which(lnz == \"```\") #> endd <- endd[endd > strt][1] #> addthis <- c(\"# Setup for targets:\", \"\", \"library(targets)\", #> \"tar_config_set(store = \\\"../_targets\\\")\", \"tar_load(model)\", #> \"# You can interact with tar objects as usual, e.g.:\", #> \"# print(model)\") #> lnz <- c(lnz[1:(endd - 1)], addthis, lnz[endd:length(lnz)]) #> writeLines(lnz, path_abs_worcs(\"manuscript/manuscript.rmd\", #> worcs_directory = worcs_directory)) #> } #> else { #> col_message(\"Could not add targets to rmarkdown manuscript.\", #> verbose = verbose, success = FALSE) #> } #> } #> debug at C:/git_repositories/worcs/R/targets.R#106: if (!dir.exists(path_abs_worcs(\"r\", worcs_directory = worcs_directory))) { #> col_message(\"Creating directory './R/' for targets scripts.\", #> verbose = verbose) #> dir.create(path_abs_worcs(\"R\", worcs_directory = worcs_directory)) #> } #> debug at C:/git_repositories/worcs/R/targets.R#107: col_message(\"Creating directory './R/' for targets scripts.\", #> verbose = verbose) #> ✔ Creating directory './R/' for targets scripts. #> debug at C:/git_repositories/worcs/R/targets.R#108: dir.create(path_abs_worcs(\"R\", worcs_directory = worcs_directory)) #> debug at C:/git_repositories/worcs/R/targets.R#112: return(invisible(TRUE)) # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Check endpoints in WORCS project — check_endpoints","title":"Check endpoints in WORCS project — check_endpoints","text":"Check checksums endpoints WORCS project match snapshots.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check endpoints in WORCS project — check_endpoints","text":"","code":"check_endpoints(worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check endpoints in WORCS project — check_endpoints","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check endpoints in WORCS project — check_endpoints","text":"Returns logical value (TRUE/FALSE) invisibly.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check endpoints in WORCS project — check_endpoints","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"check_endpoint\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE writeLines(\"test\", \"test.txt\") add_endpoint(\"test.txt\") #> ✔ Adding endpoint 'test.txt' to '.worcs'. check_endpoints() #> ✔ Endpoint 'test.txt' replicates. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate project with respect to WORCS checklist — check_worcs","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"Evaluates whether project meets criteria WORCS checklist (see worcs_checklist).","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"","code":"check_worcs(path = \".\", verbose = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"path Character. Path WORCS project folder (project .worcs file). Default: '.' (path current directory). verbose Logical. Whether show status messages evaluating checklist. Default: TRUE.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"data.frame description criteria, column evaluations ($pass). criteria must evaluated manually, $pass FALSE.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"","code":"example_dir <- file.path(tempdir(), \"badge\") dir.create(example_dir) write(\"a\", file.path(example_dir, \".worcs\")) check_worcs(path = example_dir) #> ✖ Does the project have a README.md file? #> ✖ Does the project have a LICENSE file? #> ✖ Does the project cite any references in 'manuscript.Rmd' or 'preregistration.Rmd'? #> ✖ Does the project have a public* 'data.csv' or 'synthetic_data.csv' file? (*public: version controlled in 'Git') #> ✖ Are the data checksums up to date? #> ✖ Does the project contain any '.R' code files? #> ✖ Does the project have a preregistration? #> ✖ Does the project have a 'Git' repository? #> ✖ Is the 'Git' repository connected to a remote repository (e.g., 'GitHub')? #> category name #> 1 documentation readme #> 2 documentation license #> 3 citation citation #> 4 citation comprehensive #> 5 data data #> 6 data data_checksums #> 7 code code #> 8 code code_reproducible #> 9 materials materials #> 10 design design #> 11 analysis analysis #> 12 preregistration preregistration #> 13 preregistration prereg_analysis #> 14 git git_repo #> 15 git has_remote #> description #> 1 Does the project have a README.md file? #> 2 Does the project have a LICENSE file? #> 3 Does the project cite any references in 'manuscript.Rmd' or 'preregistration.Rmd'? #> 4 Does the project cite all literature, data sources, materials, and methods (including R-packages) used? #> 5 Does the project have a public* 'data.csv' or 'synthetic_data.csv' file? (*public: version controlled in 'Git') #> 6 Are the data checksums up to date? #> 7 Does the project contain any '.R' code files? #> 8 Can the entire project be reproduced by running a single file (e.g.,'manuscript.Rmd', 'run_me.R', or a Makefile)? #> 9 Any new materials are shared openly; existing materials are referenced. #> 10 Details of the study design are documented. #> 11 Details of the analysis are documented. #> 12 Does the project have a preregistration? #> 13 Does the preregistration contain detailed analysis plans or preliminary code? #> 14 Does the project have a 'Git' repository? #> 15 Is the 'Git' repository connected to a remote repository (e.g., 'GitHub')? #> importance check pass #> 1 essential TRUE FALSE #> 2 essential TRUE FALSE #> 3 optional TRUE FALSE #> 4 optional FALSE FALSE #> 5 essential TRUE FALSE #> 6 essential TRUE FALSE #> 7 essential TRUE FALSE #> 8 optional FALSE FALSE #> 9 optional FALSE FALSE #> 10 essential FALSE FALSE #> 11 essential FALSE FALSE #> 12 optional TRUE FALSE #> 13 optional FALSE FALSE #> 14 essential TRUE FALSE #> 15 essential TRUE FALSE"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":null,"dir":"Reference","previous_headings":"","what":"Check worcs dependencies — check_worcs_installation","title":"Check worcs dependencies — check_worcs_installation","text":"function checks worcs dependencies correctly installed, suggests remedy missing dependencies.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check worcs dependencies — check_worcs_installation","text":"","code":"check_worcs_installation(what = \"all\") check_dependencies(package = \"worcs\") check_git() check_github(pat = TRUE, ssh = FALSE) check_ssh() check_tinytext() check_rmarkdown() check_renv()"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check worcs dependencies — check_worcs_installation","text":"Character vector indicating dependencies check. Default: \"\". checks defined Usage section can called, e.g. check_git can called using argument = \"git\". package Atomic character vector, indicating package check dependencies. pat Logical, whether run tests existence functioning GitHub Personal Access Token (PAT). preferred method authentication, defaults TRUE. ssh Logical, whether run tests existence functioning SSH key. method authentication recommended, defaults FALSE.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check worcs dependencies — check_worcs_installation","text":"Logical, indicating whether checks passed .","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check worcs dependencies — check_worcs_installation","text":"","code":"check_worcs_installation(\"none\")"},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Comprehensive citation Knit function for 'RStudio' — cite_all","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"wrapper render. First, function parses citations document, converting citations marked double sign, e.g.: @@reference2020, normal citations, e.g.: @reference2020. , renders file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"","code":"cite_all(...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"... arguments passed render.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"Returns NULL invisibly. function called side effect rendering 'R Markdown' file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"","code":"# NOTE: Do not use this function interactively, as in the example below. # Only specify it as custom knit function in an 'R Markdown' file, like so: # knit: worcs::cite_all if (rmarkdown::pandoc_available(\"2.0\")){ file_name <- file.path(tempdir(), \"citeall.Rmd\") loc <- rmarkdown::draft(file_name, template = \"github_document\", package = \"rmarkdown\", create_dir = FALSE, edit = FALSE) write(c(\"\", \"Optional reference: @reference2020\"), file = file_name, append = TRUE) cite_all(file_name) } #> #> #> processing file: citeall.Rmd #> 1/7 #> 2/7 [setup] #> 3/7 #> 4/7 [cars] #> 5/7 #> 6/7 [pressure] #> 7/7 #> output file: citeall.knit.md #> \"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc\" +RTS -K512m -RTS citeall.knit.md --to gfm+tex_math_dollars-yaml_metadata_block --from markdown+autolink_bare_uris+tex_math_single_backslash --output citeall.md --template \"C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\default.md\" #> \"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc\" +RTS -K512m -RTS citeall.md --to html4 --from gfm+tex_math_dollars --output citeall.html --embed-resources --standalone --highlight-style pygments --template \"C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\preview.html\" --variable \"github-markdown-css:C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\github.css\" --metadata pagetitle=PREVIEW --mathjax #> #> Preview created: citeall.html #> #> Output created: citeall.md"},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":null,"dir":"Reference","previous_headings":"","what":"Essential citations Knit function for 'RStudio' — cite_essential","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"wrapper render. First, function parses citations document, removing citations marked double sign, e.g.: @@reference2020. , renders file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"","code":"cite_essential(...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"... arguments passed render.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"Returns NULL invisibly. function called side effect rendering 'R Markdown' file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"","code":"# NOTE: Do not use this function interactively, as in the example below. # Only specify it as custom knit function in an R Markdown file, like so: # knit: worcs::cite_all if (rmarkdown::pandoc_available(\"2.0\")){ file_name <- tempfile(\"citeessential\", fileext = \".Rmd\") rmarkdown::draft(file_name, template = \"github_document\", package = \"rmarkdown\", create_dir = FALSE, edit = FALSE) write(c(\"\", \"Optional reference: @reference2020\"), file = file_name, append = TRUE) cite_essential(file_name) } #> #> #> processing file: citeessential51744b28679c.Rmd #> 1/7 #> 2/7 [setup] #> 3/7 #> 4/7 [cars] #> 5/7 #> 6/7 [pressure] #> 7/7 #> output file: citeessential51744b28679c.knit.md #> \"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc\" +RTS -K512m -RTS citeessential51744b28679c.knit.md --to gfm+tex_math_dollars-yaml_metadata_block --from markdown+autolink_bare_uris+tex_math_single_backslash --output citeessential51744b28679c.md --template \"C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\default.md\" #> \"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc\" +RTS -K512m -RTS citeessential51744b28679c.md --to html4 --from gfm+tex_math_dollars --output citeessential51744b28679c.html --embed-resources --standalone --highlight-style pygments --template \"C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\preview.html\" --variable \"github-markdown-css:C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\github.css\" --metadata pagetitle=PREVIEW --mathjax #> #> Preview created: citeessential51744b28679c.html #> #> Output created: citeessential51744b28679c.md"},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Use closed data in WORCS project — closed_data","title":"Use closed data in WORCS project — closed_data","text":"function saves data.frame .csv file (using write.csv), stores checksum '.worcs', appends .gitignore file exclude filename, saves synthetic copy data public use. generate synthetic data, function synthetic used.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use closed data in WORCS project — closed_data","text":"","code":"closed_data( data, filename = paste0(deparse(substitute(data)), \".csv\"), codebook = paste0(\"codebook_\", deparse(substitute(data)), \".Rmd\"), value_labels = paste0(\"value_labels_\", deparse(substitute(data)), \".yml\"), worcs_directory = \".\", synthetic = TRUE, save_expression = write.csv(x = data, file = filename, row.names = FALSE), load_expression = read.csv(file = filename, stringsAsFactors = TRUE), ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use closed data in WORCS project — closed_data","text":"data data.frame save. filename Character, naming file data written . default, constructs filename name object passed data. codebook Character, naming file codebook written . 'R Markdown' codebook created rendered github_document ('markdown' 'GitHub'). default, constructs filename name object passed data, adding word 'codebook'. Set argument NULL avoid creating codebook. value_labels Character, naming file value labels factors ordinal variables written . default, constructs filename name object passed data, adding word 'value_labels'. Set argument NULL avoid creating file value labels. worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. synthetic Logical, indicating whether create synthetic dataset using synthetic function. Additional arguments call synthetic can passed .... save_expression R-expression used save data. Defaults write.csv(x = data, file = filename, row.names = FALSE), writes comma-separated, spreadsheet-style file. arguments data filename passed open_data() expression defined save_expression. load_expression R-expression used load data file created save_expression. Defaults read.csv(file = filename, stringsAsFactors = TRUE). expression stored project's .worcs file, invoked load_data(). ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use closed data in WORCS project — closed_data","text":"Returns NULL invisibly. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use closed data in WORCS project — closed_data","text":"","code":"old_wd <- getwd() test_dir <- file.path(tempdir(), \"data\") dir.create(test_dir) setwd(test_dir) worcs:::write_worcsfile(\".worcs\") df <- iris[1:3, ] closed_data(df, codebook = NULL) #> ✔ Storing original data in 'df.csv' and updating the checksum in '.worcs'. #> ✔ Generating synthetic data for public use. Ensure that no identifying information is included. #> | | | 0% | |============== | 20% | |============================ | 40% | |========================================== | 60% | |======================================================== | 80% #> Warning: Dropped unused factor level(s) in dependent variable: versicolor, virginica. #> | |======================================================================| 100% #> ✔ Storing synthetic data in 'synthetic_df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. #> ✔ Updating '.gitignore'. #> ✔ Storing value labels in 'value_labels_df.yml'. setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":null,"dir":"Reference","previous_headings":"","what":"Create codebook for a dataset — make_codebook","title":"Create codebook for a dataset — make_codebook","text":"Creates codebook dataset 'R Markdown' format, renders 'markdown' 'GitHub'. codebook contains metadata documentation data file. urge users customize automatically generated 'R Markdown' document re-knit , example, add paragraph details data collection procedures. variable descriptives stored .csv file, can edited 'R' spreadsheet program. Columns can appended, encourage users complete least following two columns file: category Describe type variable column. example: \"morality\". description Provide plain-text description variable. example, full text questionnaire item: \"People willing anything help member family\". Re-knitting 'R Markdown' file (using render) transfer changes 'markdown' file 'GitHub'.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create codebook for a dataset — make_codebook","text":"","code":"make_codebook( data, filename = \"codebook.Rmd\", render_file = TRUE, csv_file = gsub(\"rmd$\", \"csv\", filename, ignore.case = TRUE), verbose = TRUE )"},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create codebook for a dataset — make_codebook","text":"data data.frame create codebook. filename Character. File name write codebook rmarkdown file . render_file Logical. Whether render document. csv_file Character. File name write codebook rmarkdown file . default, uses filename stem filename argument. Set NULL write codebook 'R Markdown' file, .csv. verbose Logical. Whether print status messages console. Default: TRUE","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create codebook for a dataset — make_codebook","text":"Logical, indicating whether operation successful. function mostly called side effect rendering 'R Markdown' codebook.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create codebook for a dataset — make_codebook","text":"","code":"if(rmarkdown::pandoc_available(\"2.0\")){ library(rmarkdown) library(knitr) filename <- tempfile(\"codebook\", fileext = \".Rmd\") make_codebook(iris, filename = filename, csv_file = NULL) unlink(c( \".worcs\", filename, gsub(\"\\\\.Rmd\", \"\\\\.md\", filename), gsub(\"\\\\.Rmd\", \"\\\\.html\", filename), gsub(\"\\\\.Rmd\", \"_files\", filename) ), recursive = TRUE) }"},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Label factor variables using metadata — data_label","title":"Label factor variables using metadata — data_label","text":"column x, function checks whether value labels exist value_labels. , integer values replaced value labels.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Label factor variables using metadata — data_label","text":"","code":"data_label( x, variables = names(x), value_labels = read_yaml(paste0(\"value_labels_\", substitute(x), \".yml\")) )"},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Label factor variables using metadata — data_label","text":"x data.frame. variables Column names x replace, Default: names(x) value_labels list value labels, typically read metadata generated open_data closed_data. Default: read_yaml(paste0(\"value_labels_\", substitute(x), \".yml\"))","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Label factor variables using metadata — data_label","text":"data.frame.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Label factor variables using metadata — data_label","text":"","code":"if (FALSE) { if(interactive()){ labs <- list(x = list(class = \"factor\", `1` = \"a\", `2` = \"b\")) df <- data.frame(x = 1:2) data_label(df, value_labels = labs) } }"},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Drop value labels — data_unlabel","title":"Drop value labels — data_unlabel","text":"Coerces factor ordered variables class integer.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drop value labels — data_unlabel","text":"","code":"data_unlabel(x, variables = names(x)[sapply(x, inherits, what = \"factor\")])"},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drop value labels — data_unlabel","text":"x data.frame. variables Column names x coerce integer.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Drop value labels — data_unlabel","text":"data.frame.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Drop value labels — data_unlabel","text":"","code":"if (FALSE) { if(interactive()){ df <- data.frame(x = factor(c(\"a\", \"b\"))) data_unlabel(df) } }"},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":null,"dir":"Reference","previous_headings":"","what":"Describe a dataset — descriptives","title":"Describe a dataset — descriptives","text":"Provide descriptive statistics dataset.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Describe a dataset — descriptives","text":"","code":"descriptives(x, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Describe a dataset — descriptives","text":"x object method exists. ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Describe a dataset — descriptives","text":"data.frame descriptive statistics x.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Describe a dataset — descriptives","text":"","code":"descriptives(iris) #> name type n missing unique mean median mode mode_value #> 1 Sepal.Length numeric 150 0 35 5.843333 5.80 5.80 #> 2 Sepal.Width numeric 150 0 23 3.057333 3.00 3.00 #> 3 Petal.Length numeric 150 0 43 3.758000 4.35 4.35 #> 4 Petal.Width numeric 150 0 22 1.199333 1.30 1.30 #> 5 Species factor 150 0 4 NA NA 50.00 setosa #> sd v min max range skew skew_2se kurt kurt_2se #> 1 0.8280661 NA 4.3 7.9 3.6 0.3086407 0.7792448 -0.6058125 -0.7696120 #> 2 0.4358663 NA 2.0 4.4 2.4 0.3126147 0.7892781 0.1387047 0.1762076 #> 3 1.7652982 NA 1.0 6.9 5.9 -0.2694109 -0.6801988 -1.4168574 -1.7999470 #> 4 0.7622377 NA 0.1 2.5 2.4 -0.1009166 -0.2547904 -1.3581792 -1.7254034 #> 5 NA 0.6666667 NA NA NA NA NA NA NA"},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Export project to .zip file — export_project","title":"Export project to .zip file — export_project","text":"Export project .zip file","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export project to .zip file — export_project","text":"","code":"export_project(zipfile = NULL, worcs_directory = \".\", open_data = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export project to .zip file — export_project","text":"zipfile Character. Path .zip file created. default argument NULL creates .zip file directory one level 'worcs' project directory. default, files tracked 'Git' included .zip file, excluding 'data.csv' open_data = FALSE. worcs_directory Character. Path WORCS project directory export. Defaults \".\", refers current working directory. open_data Logical. Whether include original data, 'data.csv', file exists. open_data = FALSE open data file exist, excluded .zip file. yet exist, synthetic data set generated added .zip file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export project to .zip file — export_project","text":"Logical, indicating success operation. function called side effect creating .zip file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export project to .zip file — export_project","text":"","code":"export_project(worcs_directory = tempdir()) #> Warning: cannot open file 'C:\\Users\\vanlissa\\AppData\\Local\\Temp\\RtmpGEycu6/.worcs': No such file or directory #> ✖ No '.worcs' file found; not a WORCS project, or the working directory has been changed."},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_check_endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Set up GitHub Actions to Check Endpoints — github_action_check_endpoints","title":"Set up GitHub Actions to Check Endpoints — github_action_check_endpoints","text":"Sets GitHub Action perform continuous integration (CI) WORCS project. CI automatically evaluates check_endpoints() push pull request.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_check_endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set up GitHub Actions to Check Endpoints — github_action_check_endpoints","text":"","code":"github_action_check_endpoints()"},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_check_endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set up GitHub Actions to Check Endpoints — github_action_check_endpoints","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_reproduce.html","id":null,"dir":"Reference","previous_headings":"","what":"Set up GitHub Action to Reproduce WORCS Project — github_action_reproduce","title":"Set up GitHub Action to Reproduce WORCS Project — github_action_reproduce","text":"Sets GitHub Action perform continuous integration (CI) WORCS project. CI automatically evaluates reproduce() check_endpoints() push pull request.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_reproduce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set up GitHub Action to Reproduce WORCS Project — github_action_reproduce","text":"","code":"github_action_reproduce()"},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_reproduce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set up GitHub Action to Reproduce WORCS Project — github_action_reproduce","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":null,"dir":"Reference","previous_headings":"","what":"Modify .gitignore file — git_ignore","title":"Modify .gitignore file — git_ignore","text":"Arguments passed ... added .gitignore file. Elements already present file modified. ignore = TRUE, arguments added .gitignore file, cause 'Git' track . ignore = FALSE, arguments prepended !, works \"double negation\", cause 'Git' track files.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modify .gitignore file — git_ignore","text":"","code":"git_ignore(..., ignore = TRUE, repo = \".\")"},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modify .gitignore file — git_ignore","text":"... number character arguments, representing files added .gitignore file. ignore Logical. Whether 'Git' ignore files. repo path existing repository, git_repository object returned git_open, git_init git_clone.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modify .gitignore file — git_ignore","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modify .gitignore file — git_ignore","text":"","code":"dir.create(\".git\") git_ignore(\"ignorethis.file\") unlink(\".git\", recursive = TRUE) file.remove(\".gitignore\") #> [1] TRUE"},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":null,"dir":"Reference","previous_headings":"","what":"Add, commit, and push changes. — git_update","title":"Add, commit, and push changes. — git_update","text":"function wrapper git_add, git_commit, git_push. adds locally changed files staging area local 'Git' repository, commits changes (optional) message, pushes remote repository. used making \"cloud backup\" local changes. use function working privacy sensitive data, file pushed remote repository. git_add argument force disabled default, avoid accidentally committing pushing file listed .gitignore.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add, commit, and push changes. — git_update","text":"","code":"git_update( message = paste0(\"update \", Sys.time()), files = \".\", repo = \".\", author, committer, remote, refspec, password, ssh_key, mirror, force, verbose = TRUE )"},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add, commit, and push changes. — git_update","text":"message commit message files vector paths relative git root directory. Use \".\" stage changed files. repo path existing repository, git_repository object returned git_open, git_init git_clone. author git_signature value, default git_signature_default. committer git_signature value, default author remote name remote listed git_remote_list() refspec string mapping remote local refs password string callback function get passwords authentication password protected ssh keys. Defaults askpass checks getOption('askpass'). ssh_key path object containing ssh private key. default look keys ssh-agent credentials::ssh_key_info. mirror use --mirror flag force use --force flag verbose display progress info downloading","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add, commit, and push changes. — git_update","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add, commit, and push changes. — git_update","text":"","code":"git_update() #> ✔ Identified local 'Git' repository. #> ✔ Added files to staging area of 'Git' repository. #> ✔ Committed staged files to 'Git' repository. #> ✔ Pushed local commits to remote repository."},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":null,"dir":"Reference","previous_headings":"","what":"Set global 'Git' credentials — git_user","title":"Set global 'Git' credentials — git_user","text":"function wrapper git_config_global_set. sets two name/value pairs : name = \"user.name\" set value name argument, name = \"user.email\" set value email argument.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set global 'Git' credentials — git_user","text":"","code":"git_user(name, email, overwrite = !has_git_user(), verbose = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set global 'Git' credentials — git_user","text":"name Character. user name want use 'Git'. email Character. email address want use 'Git'. overwrite Logical. Whether overwrite existing 'Git' credentials. Use prevent code accidentally overwriting existing 'Git' credentials. default value uses has_git_user set overwrite FALSE user credentials already exist, TRUE user credentials exist. verbose Logical. Whether print status messages console. Default: TRUE","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set global 'Git' credentials — git_user","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set global 'Git' credentials — git_user","text":"","code":"do.call(git_user, worcs:::get_user()) #> To set the 'Git' username and email, call 'git_user()' with the argument 'overwrite = TRUE'."},{"path":"https://cjvanlissa.github.io/worcs/reference/has_git_user.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether global 'Git' credentials exist — has_git_user","title":"Check whether global 'Git' credentials exist — has_git_user","text":"Check whether values user.name user.email exist exist 'Git' global configuration settings. Uses git_config_global.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/has_git_user.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether global 'Git' credentials exist — has_git_user","text":"","code":"has_git_user()"},{"path":"https://cjvanlissa.github.io/worcs/reference/has_git_user.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether global 'Git' credentials exist — has_git_user","text":"Logical, indicating whether 'Git' global configuration settings retrieved, contained values user.name user.email.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/has_git_user.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether global 'Git' credentials exist — has_git_user","text":"","code":"has_git_user() #> [1] TRUE"},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Load WORCS project data — load_data","title":"Load WORCS project data — load_data","text":"Scans WORCS project file data saved using open_data closed_data, loads data global (working) environment. function load original data available current system. synthetic dataset available, function loads synthetic data. name object containing data derived file name removing file extension, , applicable, prefix \"synthetic_\". Thus, \"data.csv\" \"synthetic_data.csv\" loaded object called data.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load WORCS project data — load_data","text":"","code":"load_data( worcs_directory = \".\", to_envir = TRUE, envir = parent.frame(1), verbose = TRUE, use_metadata = TRUE )"},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load WORCS project data — load_data","text":"worcs_directory Character, indicating WORCS project directory load data. default value \".\" points current directory. to_envir Logical, indicating whether load objects directly environment, return list containing objects. environment designated argument envir. Loading objects directly global environment user-friendly, risk overwriting existing object name, explained load. function load_data gives warning happens. envir environment data loaded. default value parent.frame(1) refers global environment interactive session. verbose Logical. Whether print status messages console. Default: TRUE use_metadata Logical. Whether use codebook value labels attempt coerce class values variables recorded therein. Default: TRUE","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load WORCS project data — load_data","text":"Returns list invisibly. to_envir = TRUE, list contains loaded data files. to_envir = FALSE, list empty, loaded data files attached directly global environment.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load WORCS project data — load_data","text":"","code":"test_dir <- file.path(tempdir(), \"loaddata\") old_wd <- getwd() dir.create(test_dir) setwd(test_dir) worcs:::write_worcsfile(\".worcs\") df <- iris[1:5, ] suppressWarnings(closed_data(df, codebook = NULL)) #> ✔ Storing original data in 'df.csv' and updating the checksum in '.worcs'. #> ✔ Generating synthetic data for public use. Ensure that no identifying information is included. #> | | | 0% | |============== | 20% | |============================ | 40% | |========================================== | 60% | |======================================================== | 80% | |======================================================================| 100% #> ✔ Storing synthetic data in 'synthetic_df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. #> ✔ Updating '.gitignore'. #> ✔ Storing value labels in 'value_labels_df.yml'. load_data() #> ✔ Loading original data from 'df.csv'. #> ✖ No valid codebook found. #> Warning: Object 'df' already exists in the environment designated by 'envir', and will be replaced with the contents of 'df.csv'. data #> function (..., list = character(), package = NULL, lib.loc = NULL, #> verbose = getOption(\"verbose\"), envir = .GlobalEnv, overwrite = TRUE) #> { #> fileExt <- function(x) { #> db <- grepl(\"\\\\.[^.]+\\\\.(gz|bz2|xz)$\", x) #> ans <- sub(\".*\\\\.\", \"\", x) #> ans[db] <- sub(\".*\\\\.([^.]+\\\\.)(gz|bz2|xz)$\", \"\\\\1\\\\2\", #> x[db]) #> ans #> } #> my_read_table <- function(...) { #> lcc <- Sys.getlocale(\"LC_COLLATE\") #> on.exit(Sys.setlocale(\"LC_COLLATE\", lcc)) #> Sys.setlocale(\"LC_COLLATE\", \"C\") #> read.table(...) #> } #> stopifnot(is.character(list)) #> names <- c(as.character(substitute(list(...))[-1L]), list) #> if (!is.null(package)) { #> if (!is.character(package)) #> stop(\"'package' must be a character vector or NULL\") #> } #> paths <- find.package(package, lib.loc, verbose = verbose) #> if (is.null(lib.loc)) #> paths <- c(path.package(package, TRUE), if (!length(package)) getwd(), #> paths) #> paths <- unique(normalizePath(paths[file.exists(paths)])) #> paths <- paths[dir.exists(file.path(paths, \"data\"))] #> dataExts <- tools:::.make_file_exts(\"data\") #> if (length(names) == 0L) { #> db <- matrix(character(), nrow = 0L, ncol = 4L) #> for (path in paths) { #> entries <- NULL #> packageName <- if (file_test(\"-f\", file.path(path, #> \"DESCRIPTION\"))) #> basename(path) #> else \".\" #> if (file_test(\"-f\", INDEX <- file.path(path, \"Meta\", #> \"data.rds\"))) { #> entries <- readRDS(INDEX) #> } #> else { #> dataDir <- file.path(path, \"data\") #> entries <- tools::list_files_with_type(dataDir, #> \"data\") #> if (length(entries)) { #> entries <- unique(tools::file_path_sans_ext(basename(entries))) #> entries <- cbind(entries, \"\") #> } #> } #> if (NROW(entries)) { #> if (is.matrix(entries) && ncol(entries) == 2L) #> db <- rbind(db, cbind(packageName, dirname(path), #> entries)) #> else warning(gettextf(\"data index for package %s is invalid and will be ignored\", #> sQuote(packageName)), domain = NA, call. = FALSE) #> } #> } #> colnames(db) <- c(\"Package\", \"LibPath\", \"Item\", \"Title\") #> footer <- if (missing(package)) #> paste0(\"Use \", sQuote(paste(\"data(package =\", \".packages(all.available = TRUE))\")), #> \"\\n\", \"to list the data sets in all *available* packages.\") #> else NULL #> y <- list(title = \"Data sets\", header = NULL, results = db, #> footer = footer) #> class(y) <- \"packageIQR\" #> return(y) #> } #> paths <- file.path(paths, \"data\") #> for (name in names) { #> found <- FALSE #> for (p in paths) { #> tmp_env <- if (overwrite) #> envir #> else new.env() #> if (file_test(\"-f\", file.path(p, \"Rdata.rds\"))) { #> rds <- readRDS(file.path(p, \"Rdata.rds\")) #> if (name %in% names(rds)) { #> found <- TRUE #> if (verbose) #> message(sprintf(\"name=%s:\\t found in Rdata.rds\", #> name), domain = NA) #> thispkg <- sub(\".*/([^/]*)/data$\", \"\\\\1\", p) #> thispkg <- sub(\"_.*$\", \"\", thispkg) #> thispkg <- paste0(\"package:\", thispkg) #> objs <- rds[[name]] #> lazyLoad(file.path(p, \"Rdata\"), envir = tmp_env, #> filter = function(x) x %in% objs) #> break #> } #> else if (verbose) #> message(sprintf(\"name=%s:\\t NOT found in names() of Rdata.rds, i.e.,\\n\\t%s\\n\", #> name, paste(names(rds), collapse = \",\")), #> domain = NA) #> } #> files <- list.files(p, full.names = TRUE) #> files <- files[grep(name, files, fixed = TRUE)] #> if (length(files) > 1L) { #> o <- match(fileExt(files), dataExts, nomatch = 100L) #> paths0 <- dirname(files) #> paths0 <- factor(paths0, levels = unique(paths0)) #> files <- files[order(paths0, o)] #> } #> if (length(files)) { #> for (file in files) { #> if (verbose) #> message(\"name=\", name, \":\\t file= ...\", .Platform$file.sep, #> basename(file), \"::\\t\", appendLF = FALSE, #> domain = NA) #> ext <- fileExt(file) #> if (basename(file) != paste0(name, \".\", ext)) #> found <- FALSE #> else { #> found <- TRUE #> switch(ext, R = , r = { #> library(\"utils\") #> sys.source(file, chdir = TRUE, envir = tmp_env) #> }, RData = , rdata = , rda = load(file, envir = tmp_env), #> TXT = , txt = , tab = , tab.gz = , tab.bz2 = , #> tab.xz = , txt.gz = , txt.bz2 = , txt.xz = assign(name, #> my_read_table(file, header = TRUE, as.is = FALSE), #> envir = tmp_env), CSV = , csv = , csv.gz = , #> csv.bz2 = , csv.xz = assign(name, my_read_table(file, #> header = TRUE, sep = \";\", as.is = FALSE), #> envir = tmp_env), found <- FALSE) #> } #> if (found) #> break #> } #> if (verbose) #> message(if (!found) #> \"*NOT* \", \"found\", domain = NA) #> } #> if (found) #> break #> } #> if (!found) { #> warning(gettextf(\"data set %s not found\", sQuote(name)), #> domain = NA) #> } #> else if (!overwrite) { #> for (o in ls(envir = tmp_env, all.names = TRUE)) { #> if (exists(o, envir = envir, inherits = FALSE)) #> warning(gettextf(\"an object named %s already exists and will not be overwritten\", #> sQuote(o))) #> else assign(o, get(o, envir = tmp_env, inherits = FALSE), #> envir = envir) #> } #> rm(tmp_env) #> } #> } #> invisible(names) #> } #> #> rm(\"data\") #> Warning: object 'data' not found file.remove(\"data.csv\") #> Warning: cannot remove file 'data.csv', reason 'No such file or directory' #> [1] FALSE load_data() #> ✔ Loading original data from 'df.csv'. #> ✖ No valid codebook found. #> Warning: Object 'df' already exists in the environment designated by 'envir', and will be replaced with the contents of 'df.csv'. data #> function (..., list = character(), package = NULL, lib.loc = NULL, #> verbose = getOption(\"verbose\"), envir = .GlobalEnv, overwrite = TRUE) #> { #> fileExt <- function(x) { #> db <- grepl(\"\\\\.[^.]+\\\\.(gz|bz2|xz)$\", x) #> ans <- sub(\".*\\\\.\", \"\", x) #> ans[db] <- sub(\".*\\\\.([^.]+\\\\.)(gz|bz2|xz)$\", \"\\\\1\\\\2\", #> x[db]) #> ans #> } #> my_read_table <- function(...) { #> lcc <- Sys.getlocale(\"LC_COLLATE\") #> on.exit(Sys.setlocale(\"LC_COLLATE\", lcc)) #> Sys.setlocale(\"LC_COLLATE\", \"C\") #> read.table(...) #> } #> stopifnot(is.character(list)) #> names <- c(as.character(substitute(list(...))[-1L]), list) #> if (!is.null(package)) { #> if (!is.character(package)) #> stop(\"'package' must be a character vector or NULL\") #> } #> paths <- find.package(package, lib.loc, verbose = verbose) #> if (is.null(lib.loc)) #> paths <- c(path.package(package, TRUE), if (!length(package)) getwd(), #> paths) #> paths <- unique(normalizePath(paths[file.exists(paths)])) #> paths <- paths[dir.exists(file.path(paths, \"data\"))] #> dataExts <- tools:::.make_file_exts(\"data\") #> if (length(names) == 0L) { #> db <- matrix(character(), nrow = 0L, ncol = 4L) #> for (path in paths) { #> entries <- NULL #> packageName <- if (file_test(\"-f\", file.path(path, #> \"DESCRIPTION\"))) #> basename(path) #> else \".\" #> if (file_test(\"-f\", INDEX <- file.path(path, \"Meta\", #> \"data.rds\"))) { #> entries <- readRDS(INDEX) #> } #> else { #> dataDir <- file.path(path, \"data\") #> entries <- tools::list_files_with_type(dataDir, #> \"data\") #> if (length(entries)) { #> entries <- unique(tools::file_path_sans_ext(basename(entries))) #> entries <- cbind(entries, \"\") #> } #> } #> if (NROW(entries)) { #> if (is.matrix(entries) && ncol(entries) == 2L) #> db <- rbind(db, cbind(packageName, dirname(path), #> entries)) #> else warning(gettextf(\"data index for package %s is invalid and will be ignored\", #> sQuote(packageName)), domain = NA, call. = FALSE) #> } #> } #> colnames(db) <- c(\"Package\", \"LibPath\", \"Item\", \"Title\") #> footer <- if (missing(package)) #> paste0(\"Use \", sQuote(paste(\"data(package =\", \".packages(all.available = TRUE))\")), #> \"\\n\", \"to list the data sets in all *available* packages.\") #> else NULL #> y <- list(title = \"Data sets\", header = NULL, results = db, #> footer = footer) #> class(y) <- \"packageIQR\" #> return(y) #> } #> paths <- file.path(paths, \"data\") #> for (name in names) { #> found <- FALSE #> for (p in paths) { #> tmp_env <- if (overwrite) #> envir #> else new.env() #> if (file_test(\"-f\", file.path(p, \"Rdata.rds\"))) { #> rds <- readRDS(file.path(p, \"Rdata.rds\")) #> if (name %in% names(rds)) { #> found <- TRUE #> if (verbose) #> message(sprintf(\"name=%s:\\t found in Rdata.rds\", #> name), domain = NA) #> thispkg <- sub(\".*/([^/]*)/data$\", \"\\\\1\", p) #> thispkg <- sub(\"_.*$\", \"\", thispkg) #> thispkg <- paste0(\"package:\", thispkg) #> objs <- rds[[name]] #> lazyLoad(file.path(p, \"Rdata\"), envir = tmp_env, #> filter = function(x) x %in% objs) #> break #> } #> else if (verbose) #> message(sprintf(\"name=%s:\\t NOT found in names() of Rdata.rds, i.e.,\\n\\t%s\\n\", #> name, paste(names(rds), collapse = \",\")), #> domain = NA) #> } #> files <- list.files(p, full.names = TRUE) #> files <- files[grep(name, files, fixed = TRUE)] #> if (length(files) > 1L) { #> o <- match(fileExt(files), dataExts, nomatch = 100L) #> paths0 <- dirname(files) #> paths0 <- factor(paths0, levels = unique(paths0)) #> files <- files[order(paths0, o)] #> } #> if (length(files)) { #> for (file in files) { #> if (verbose) #> message(\"name=\", name, \":\\t file= ...\", .Platform$file.sep, #> basename(file), \"::\\t\", appendLF = FALSE, #> domain = NA) #> ext <- fileExt(file) #> if (basename(file) != paste0(name, \".\", ext)) #> found <- FALSE #> else { #> found <- TRUE #> switch(ext, R = , r = { #> library(\"utils\") #> sys.source(file, chdir = TRUE, envir = tmp_env) #> }, RData = , rdata = , rda = load(file, envir = tmp_env), #> TXT = , txt = , tab = , tab.gz = , tab.bz2 = , #> tab.xz = , txt.gz = , txt.bz2 = , txt.xz = assign(name, #> my_read_table(file, header = TRUE, as.is = FALSE), #> envir = tmp_env), CSV = , csv = , csv.gz = , #> csv.bz2 = , csv.xz = assign(name, my_read_table(file, #> header = TRUE, sep = \";\", as.is = FALSE), #> envir = tmp_env), found <- FALSE) #> } #> if (found) #> break #> } #> if (verbose) #> message(if (!found) #> \"*NOT* \", \"found\", domain = NA) #> } #> if (found) #> break #> } #> if (!found) { #> warning(gettextf(\"data set %s not found\", sQuote(name)), #> domain = NA) #> } #> else if (!overwrite) { #> for (o in ls(envir = tmp_env, all.names = TRUE)) { #> if (exists(o, envir = envir, inherits = FALSE)) #> warning(gettextf(\"an object named %s already exists and will not be overwritten\", #> sQuote(o))) #> else assign(o, get(o, envir = tmp_env, inherits = FALSE), #> envir = envir) #> } #> rm(tmp_env) #> } #> } #> invisible(names) #> } #> #> setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Load project entry points — load_entrypoint","title":"Load project entry points — load_entrypoint","text":"Loads designated project entry point default editor, using file.edit.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load project entry points — load_entrypoint","text":"","code":"load_entrypoint(worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load project entry points — load_entrypoint","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments passed file.edit.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load project entry points — load_entrypoint","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load project entry points — load_entrypoint","text":"","code":"if (FALSE) { # Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"entrypoint\") dir.create(test_dir) setwd(test_dir) # Prepare worcs file and dummy entry point worcs:::write_worcsfile(\".worcs\", entry_point = \"test.txt\") writeLines(\"Hello world\", con = file(\"test.txt\", \"w\")) # Demonstrate load_entrypoint() load_entrypoint() # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE) }"},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":null,"dir":"Reference","previous_headings":"","what":"Notify the user when synthetic data are being used — notify_synthetic","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"function prints notification message data used project synthetic (see closed_data synthetic). See details important information.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"","code":"notify_synthetic(..., msg = NULL)"},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"... Objects class worcs_data. function check original synthetic data. msg Expression containing message print case worcs_data original. message may refer is_synth, logical vector indicating worcs_data objects synthetic.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"return value. function called side effect printing notification message.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"preferred way use function provide specific data objects function call, using ... argument. objects provided, notify_synthetic scan parent environment objects class worcs_data. function emphatically designed included 'R Markdown' file, dynamically generate notification message third party 'Knits' document without access original data.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"","code":"df <- iris class(df) <- c(\"worcs_data\", class(df)) attr(df, \"type\") <- \"synthetic\" notify_synthetic(df, msg = \"synthetic\") #> synthetic"},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Use open data in WORCS project — open_data","title":"Use open data in WORCS project — open_data","text":"function saves data.frame .csv file (using write.csv), stores checksum '.worcs', amends .gitignore file exclude filename.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use open data in WORCS project — open_data","text":"","code":"open_data( data, filename = paste0(deparse(substitute(data)), \".csv\"), codebook = paste0(\"codebook_\", deparse(substitute(data)), \".Rmd\"), value_labels = paste0(\"value_labels_\", deparse(substitute(data)), \".yml\"), worcs_directory = \".\", save_expression = write.csv(x = data, file = filename, row.names = FALSE), load_expression = read.csv(file = filename, stringsAsFactors = TRUE), ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use open data in WORCS project — open_data","text":"data data.frame save. filename Character, naming file data written . default, constructs filename name object passed data. codebook Character, naming file codebook written . 'R Markdown' codebook created rendered github_document ('markdown' 'GitHub'). default, constructs filename name object passed data, adding word 'codebook'. Set argument NULL avoid creating codebook. value_labels Character, naming file value labels factors ordinal variables written . default, constructs filename name object passed data, adding word 'value_labels'. Set argument NULL avoid creating file value labels. worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. save_expression R-expression used save data. Defaults write.csv(x = data, file = filename, row.names = FALSE), writes comma-separated, spreadsheet-style file. arguments data filename passed open_data() expression defined save_expression. load_expression R-expression used load data file created save_expression. Defaults read.csv(file = filename, stringsAsFactors = TRUE). expression stored project's .worcs file, invoked load_data(). ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use open data in WORCS project — open_data","text":"Returns NULL invisibly. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use open data in WORCS project — open_data","text":"","code":"test_dir <- file.path(tempdir(), \"data\") old_wd <- getwd() dir.create(test_dir) setwd(test_dir) worcs:::write_worcsfile(\".worcs\") df <- iris[1:5, ] open_data(df, codebook = NULL) #> ✔ Storing original data in 'df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. #> ✔ Storing value labels in 'value_labels_df.yml'. setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":null,"dir":"Reference","previous_headings":"","what":"Report formatted number — report","title":"Report formatted number — report","text":"Report number, rounded specific number decimals (defaults two), using formatC. Intended 'R Markdown' reports.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report formatted number — report","text":"","code":"report(x, digits = 2, equals = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report formatted number — report","text":"x Numeric. Value reported digits Integer. Number digits round . equals Logical. Whether report equals (: smaller ) sign.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report formatted number — report","text":"atomic character vector.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Report formatted number — report","text":"Caspar J. van Lissa","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report formatted number — report","text":"","code":"report(.0234) #> [1] \"= 0.02\""},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":null,"dir":"Reference","previous_headings":"","what":"Reproduce WORCS Project — reproduce","title":"Reproduce WORCS Project — reproduce","text":"Evaluate recipe contained WORCS project derive endpoints.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reproduce WORCS Project — reproduce","text":"","code":"reproduce(worcs_directory = \".\", verbose = TRUE, check_endpoints = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reproduce WORCS Project — reproduce","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE check_endpoints Logical. Whether call check_endpoints() reproducing recipe. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reproduce WORCS Project — reproduce","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reproduce WORCS Project — reproduce","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"reproduce\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE worcs:::add_recipe(recipe = 'writeLines(\"test\", \"test.txt\")') #> ✔ Adding recipe to '.worcs'. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate skew and kurtosis — skew_kurtosis","title":"Calculate skew and kurtosis — skew_kurtosis","text":"Calculate skew kurtosis, standard errors , estimates divided two times standard error. latter quantity exceeds absolute value 1, skew/kurtosis significant. large sample sizes, significant skew/kurtosis common.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate skew and kurtosis — skew_kurtosis","text":"","code":"skew_kurtosis(x, verbose = FALSE, se = FALSE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate skew and kurtosis — skew_kurtosis","text":"x object method exists. verbose Logical. Whether print messages console, Default: FALSE se Whether return standard errors, Default: FALSE ... Additional arguments pass functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate skew and kurtosis — skew_kurtosis","text":"matrix skew kurtosis statistics x.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate skew and kurtosis — skew_kurtosis","text":"","code":"skew_kurtosis(datasets::anscombe) #> skew skew_2se kurt kurt_2se #> x1 0.00000000 0.0000000 -1.5289256 -0.5975093 #> x2 0.00000000 0.0000000 -1.5289256 -0.5975093 #> x3 0.00000000 0.0000000 -1.5289256 -0.5975093 #> x4 2.46691100 1.8669273 4.5206612 1.7666896 #> y1 -0.04837355 -0.0366085 -1.1991228 -0.4686212 #> y2 -0.97869294 -0.7406626 -0.5143191 -0.2009976 #> y3 1.38012040 1.0444578 1.2400439 0.4846133 #> y4 1.12077386 0.8481876 0.6287512 0.2457181"},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Snapshot endpoints in WORCS project — snapshot_endpoints","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"Update checksums endpoints WORCS project.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"","code":"snapshot_endpoints(worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"update_endpoint\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE writeLines(\"test\", \"test.txt\") add_endpoint(\"test.txt\") #> ✔ Adding endpoint 'test.txt' to '.worcs'. writeLines(\"second test\", \"test.txt\") snapshot_endpoints() #> ✔ Update snapshot of endpoint 'test.txt'. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate synthetic data — synthetic","title":"Generate synthetic data — synthetic","text":"Generates synthetic version data.frame, similar characteristics original. See Details algorithm used.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate synthetic data — synthetic","text":"","code":"synthetic( data, model_expression = ranger(x = x, y = y), predict_expression = predict(model, data = xsynth)$predictions, missingness_expression = NULL, verbose = TRUE )"},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate synthetic data — synthetic","text":"data data.frame make synthetic version. model_expression R-expression estimate model. Defaults ranger(x = x, y = y), uses fast implementation random forests ranger. expression evaluated environment containing objects x y, x data.frame predictor variables, y vector outcome values (see Details). predict_expression R-expression generate predicted values based model estimated model_expression. Defaults predict(model, data = xsynth)$predictions. expression must return vector predicted values. expression evaluated environment containing objects model xsynth, model model estimated model_expression, xsynth data.frame synthetic data used predict next column (see Details). missingness_expression Optional. R-expression impute missing values. Defaults NULL, means listwise deletion used. expression evaluated environment containing object data, specified call synthetic. must return data.frame dimensions column names original data. example, use missingness_expression = missRanger::missRanger(data = data) fast implementation excellent 'missForest' single imputation technique. verbose Logical, Default: TRUE. Whether show progress bar running algorithm provide informative messages.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate synthetic data — synthetic","text":"data.frame synthetic data, based data.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate synthetic data — synthetic","text":"Based work Nowok, Raab, Dibben (2016), function uses simple algorithm generate synthetic dataset similar characteristics original. algorithm follows: Let x original data.frame, columns 1:j Let xsynth synthetic data.frame, columns 1:j Column 1 xsynth bootstrapped version column 1 x Using model_expression, predictive model built column c, c along 2:j, c predicted columns 1:(c-1) original data. Using predict_expression, columns 1:(c-1) synthetic data used predict synthetic values column c. Variables thus imputed order occurrence data.frame. impute different order, reorder data. Note , data synthesis work properly, essential class variables defined correctly. default algorithm ranger supports numeric, integer, factor types. types variables converted one types, users can use custom model_expression predict_expressio calling synthetic. Note data synthesis work properly, essential class variables defined correctly. default algorithm ranger supports numeric, integer, factor, logical data. types variables converted one types. Users can provide use custom model_expression predict_expression use different algorithm calling synthetic. demonstrated example, users call lm model_expression use linear regression, preserves linear marginal relationships can give rise values range original data. users call sample predict_expression bootstrap variable, quick solution maintains univariate distributions loses marginal relationships. examples exhaustive, users can even create custom functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate synthetic data — synthetic","text":"Nowok, B., Raab, G.M Dibben, C. (2016). synthpop: Bespoke creation synthetic data R. Journal Statistical Software, 74(11), 1-26. doi:10.18637/jss.v074.i11 .","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate synthetic data — synthetic","text":"","code":"if (FALSE) { # Example using the iris dataset and default ranger algorithm iris_syn <- synthetic(iris) # Example using lm as prediction algorithm (only works for numeric variables) # note that, within the model_expression, a new data.frame is created because # lm() requires a separate data argument: dat <- iris[, 1:4] synthetic(dat, model_expression = lm(.outcome ~ ., data = data.frame(.outcome = y, xsynth)), predict_expression = predict(model, newdata = xsynth)) } # Example using bootstrapping: synthetic(iris, model_expression = NULL, predict_expression = sample(y, size = length(y), replace = TRUE)) #> | | | 0% | |============== | 20% | |============================ | 40% | |========================================== | 60% | |======================================================== | 80% | |======================================================================| 100% #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.6 3.3 4.6 0.2 virginica #> 2 4.4 3.8 3.9 0.4 setosa #> 3 6.1 2.7 5.0 0.2 versicolor #> 4 5.4 2.9 1.6 1.8 setosa #> 5 5.6 3.3 1.5 2.3 versicolor #> 6 4.4 2.8 4.5 0.2 setosa #> 7 5.9 3.2 1.4 1.3 versicolor #> 8 4.9 3.0 1.4 1.3 versicolor #> 9 6.5 3.1 3.6 1.9 virginica #> 10 5.4 3.0 4.9 0.2 versicolor #> 11 5.1 3.5 4.9 0.2 setosa #> 12 5.6 2.7 1.5 2.2 setosa #> 13 6.4 3.0 1.5 1.8 versicolor #> 14 5.6 2.7 1.5 1.4 versicolor #> 15 5.6 3.3 4.0 1.6 versicolor #> 16 4.8 2.5 4.2 1.6 virginica #> 17 5.0 3.1 4.2 1.3 setosa #> 18 7.3 2.8 4.2 2.4 virginica #> 19 5.8 3.0 1.3 2.1 virginica #> 20 6.1 3.2 4.1 0.2 versicolor #> 21 5.2 3.2 1.5 0.2 setosa #> 22 4.6 2.8 1.7 0.3 versicolor #> 23 6.4 3.4 4.5 2.1 setosa #> 24 4.9 3.4 3.5 2.3 virginica #> 25 7.2 3.1 5.1 2.5 virginica #> 26 6.7 3.2 5.5 1.8 setosa #> 27 7.6 3.1 1.7 0.4 setosa #> 28 7.4 2.8 1.5 2.1 setosa #> 29 4.9 3.3 1.3 1.7 versicolor #> 30 5.6 2.2 4.5 1.9 versicolor #> 31 6.3 4.1 1.9 1.0 setosa #> 32 5.9 3.2 1.6 2.3 versicolor #> 33 6.3 2.5 1.3 2.0 versicolor #> 34 4.9 3.0 1.4 0.2 virginica #> 35 6.1 2.6 4.9 1.4 virginica #> 36 5.1 2.2 4.5 0.1 virginica #> 37 4.8 3.2 5.1 1.0 versicolor #> 38 5.0 3.1 5.7 1.5 versicolor #> 39 4.5 3.6 3.0 1.8 setosa #> 40 6.7 3.2 1.5 2.3 virginica #> 41 5.8 3.0 4.9 1.1 virginica #> 42 7.1 3.1 1.4 0.4 setosa #> 43 5.0 2.7 1.9 1.3 setosa #> 44 5.2 2.8 1.3 2.3 virginica #> 45 4.3 3.0 3.3 0.1 setosa #> 46 5.0 3.4 4.1 0.2 setosa #> 47 5.8 2.7 4.4 0.3 setosa #> 48 6.3 3.1 1.5 0.2 virginica #> 49 5.4 3.5 5.8 2.4 setosa #> 50 4.8 2.7 3.5 0.2 setosa #> 51 5.7 3.4 1.4 0.3 setosa #> 52 6.8 2.5 1.4 1.8 versicolor #> 53 5.4 2.8 4.5 0.2 versicolor #> 54 6.5 3.4 5.0 2.0 versicolor #> 55 5.4 2.6 1.3 1.3 virginica #> 56 5.0 3.9 5.0 1.5 versicolor #> 57 4.6 2.8 4.6 2.0 versicolor #> 58 5.5 3.4 5.6 1.3 versicolor #> 59 6.3 3.4 1.4 1.0 virginica #> 60 7.0 3.0 1.6 2.5 versicolor #> 61 6.5 3.4 4.6 0.4 setosa #> 62 6.7 3.2 3.3 1.3 virginica #> 63 4.8 2.9 5.7 1.3 virginica #> 64 6.9 2.9 1.6 0.2 virginica #> 65 5.1 3.0 1.4 1.2 versicolor #> 66 4.6 3.4 1.5 1.6 virginica #> 67 5.0 3.8 5.0 1.8 versicolor #> 68 5.5 2.9 1.2 1.3 virginica #> 69 5.0 3.1 4.0 1.4 virginica #> 70 6.3 3.4 1.5 1.2 virginica #> 71 7.0 3.5 6.1 2.0 setosa #> 72 6.1 2.9 4.6 1.8 versicolor #> 73 6.7 3.0 1.9 2.0 versicolor #> 74 4.8 3.2 1.4 1.0 virginica #> 75 4.4 2.4 1.5 1.8 setosa #> 76 4.7 3.2 5.6 1.7 setosa #> 77 4.6 3.2 3.3 2.4 versicolor #> 78 4.8 3.0 6.1 2.1 virginica #> 79 4.4 3.0 1.4 2.1 setosa #> 80 6.0 2.6 5.4 1.3 setosa #> 81 4.5 3.4 1.5 1.9 virginica #> 82 5.1 3.5 4.0 0.3 versicolor #> 83 6.8 2.3 4.9 1.6 versicolor #> 84 5.8 2.0 4.8 1.5 virginica #> 85 5.0 2.8 5.1 2.5 virginica #> 86 5.4 3.1 5.6 1.8 setosa #> 87 4.9 2.8 6.1 1.0 setosa #> 88 5.2 2.7 5.8 1.4 virginica #> 89 6.1 3.4 1.6 1.4 setosa #> 90 5.8 4.2 4.5 1.4 setosa #> 91 6.9 3.2 4.4 1.6 versicolor #> 92 6.7 3.2 1.4 1.4 setosa #> 93 5.5 3.5 4.5 0.1 virginica #> 94 7.3 3.1 6.0 1.1 versicolor #> 95 7.9 3.5 3.0 0.2 versicolor #> 96 5.8 2.7 6.4 1.9 virginica #> 97 5.7 2.6 4.2 1.3 versicolor #> 98 6.4 2.3 1.5 0.2 setosa #> 99 6.7 3.1 4.8 2.4 virginica #> 100 4.8 3.9 4.5 0.2 versicolor #> 101 5.1 3.8 4.7 2.5 versicolor #> 102 5.6 2.4 1.7 1.8 versicolor #> 103 4.9 4.1 5.6 1.3 setosa #> 104 6.3 3.9 1.0 1.4 virginica #> 105 5.6 2.9 5.7 1.0 setosa #> 106 5.2 3.3 1.4 1.3 versicolor #> 107 5.3 3.1 5.7 0.2 versicolor #> 108 6.0 4.4 1.3 0.2 versicolor #> 109 4.6 2.7 4.7 1.9 setosa #> 110 6.3 3.5 1.4 1.0 versicolor #> 111 4.8 3.4 3.0 1.3 versicolor #> 112 5.5 3.1 4.3 1.5 virginica #> 113 5.1 3.3 1.1 2.2 setosa #> 114 6.1 2.8 4.7 2.4 virginica #> 115 6.1 2.7 5.2 2.5 virginica #> 116 6.3 2.0 1.7 0.2 setosa #> 117 4.8 2.8 4.8 2.0 versicolor #> 118 4.7 3.0 4.7 1.3 virginica #> 119 6.8 2.4 4.7 1.2 versicolor #> 120 6.1 3.0 1.3 0.3 virginica #> 121 6.9 3.0 1.5 1.3 versicolor #> 122 6.7 4.2 1.4 1.5 setosa #> 123 5.9 3.4 5.1 1.0 versicolor #> 124 5.0 3.9 1.6 1.5 versicolor #> 125 6.1 2.8 1.3 0.2 virginica #> 126 6.3 2.0 4.0 1.3 setosa #> 127 6.5 3.6 1.7 1.3 setosa #> 128 7.2 3.2 3.7 1.4 versicolor #> 129 6.3 2.5 1.6 0.2 setosa #> 130 4.4 3.2 5.2 2.0 setosa #> 131 5.2 3.2 4.5 1.5 versicolor #> 132 5.7 3.4 4.7 0.2 versicolor #> 133 6.7 3.0 5.6 2.3 setosa #> 134 5.8 3.4 5.1 0.4 virginica #> 135 4.9 2.9 3.9 0.2 setosa #> 136 5.4 3.6 3.0 2.5 versicolor #> 137 5.6 3.1 5.5 0.2 setosa #> 138 5.2 3.3 3.6 1.4 setosa #> 139 4.8 2.5 5.0 0.2 versicolor #> 140 6.7 3.0 5.6 2.0 setosa #> 141 6.4 3.1 4.9 1.9 virginica #> 142 4.4 2.5 1.5 0.6 virginica #> 143 6.4 3.1 4.6 0.1 setosa #> 144 7.7 3.6 1.6 0.3 setosa #> 145 6.5 3.0 1.7 1.9 versicolor #> 146 5.2 2.7 1.4 1.9 setosa #> 147 6.0 3.2 1.3 2.5 virginica #> 148 6.0 2.8 1.4 0.2 setosa #> 149 5.5 2.8 5.1 1.8 setosa #> 150 4.5 3.2 5.1 2.0 versicolor if (FALSE) { # Example with missing data, no imputation iris_missings <- iris for(i in 1:10){ iris_missings[sample.int(nrow(iris_missings), 1, replace = TRUE), sample.int(ncol(iris_missings), 1, replace = TRUE)] <- NA } iris_miss_syn <- synthetic(iris_missings) # Example with missing data, imputation by median/mode substitution # First, define a simple function for median/mode substitution: imp_fun <- function(x){ if(is.data.frame(x)){ return(data.frame(sapply(x, imp_fun))) } else { out <- x if(inherits(x, \"numeric\")){ out[is.na(out)] <- median(x[!is.na(out)]) } else { out[is.na(out)] <- names(sort(table(out), decreasing = TRUE))[1] } out } } # Then, call synthetic() with this function as missingness_expression: iris_miss_syn <- synthetic(iris_missings, missingness_expression = imp_fun(data)) }"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":null,"dir":"Reference","previous_headings":"","what":"Add WORCS badge to README.md — worcs_badge","title":"Add WORCS badge to README.md — worcs_badge","text":"Evaluates whether project meets criteria WORCS checklist (see worcs_checklist), adds badge project's README.md.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add WORCS badge to README.md — worcs_badge","text":"","code":"worcs_badge( path = \".\", update_readme = \"README.md\", update_csv = \"checklist.csv\" )"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add WORCS badge to README.md — worcs_badge","text":"path Character. can either path WORCS project folder (project .worcs file), path checklist.csv file. latter useful want evaluate manually updated checklist file. Default: '.' (path current directory). update_readme Character. Path README.md file add badge . Default: 'README.md'. Set NULL avoid updating README.md file. update_csv Character. Path README.md file add badge . Default: 'checklist.csv'. Set NULL avoid updating checklist.csv file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add WORCS badge to README.md — worcs_badge","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add WORCS badge to README.md — worcs_badge","text":"","code":"example_dir <- file.path(tempdir(), \"badge\") dir.create(example_dir) #> Warning: 'C:\\Users\\vanlissa\\AppData\\Local\\Temp\\RtmpGEycu6\\badge' already exists write(\"a\", file.path(example_dir, \".worcs\")) worcs_badge(path = example_dir, update_readme = NULL)"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_checklist.html","id":null,"dir":"Reference","previous_headings":"","what":"WORCS checklist — worcs_checklist","title":"WORCS checklist — worcs_checklist","text":"checklist can used see whether project adheres principles open reproducible code science, set WORCS paper.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_checklist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WORCS checklist — worcs_checklist","text":"","code":"data(worcs_checklist)"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_checklist.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"WORCS checklist — worcs_checklist","text":"data frame 15 rows 5 variables.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_checklist.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"WORCS checklist — worcs_checklist","text":"Van Lissa, C. J., Brandmaier, . M., Brinkman, L., Lamprecht, ., Peikert, ., , Struiksma, M. E., & Vreede, B. (2021) doi:10.3233/DS-210031 .","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Create new WORCS project — worcs_project","title":"Create new WORCS project — worcs_project","text":"Creates new 'worcs' project. function invoked 'RStudio' project template manager, can also called directly create WORCS project syntax console.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create new WORCS project — worcs_project","text":"","code":"worcs_project( path = \"worcs_project\", manuscript = \"APA6\", preregistration = \"cos_prereg\", add_license = \"CC_BY_4.0\", use_renv = TRUE, use_targets = FALSE, remote_repo = \"https\", verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create new WORCS project — worcs_project","text":"path Character, indicating directory create 'worcs' project. Default: 'worcs_project'. manuscript Character, indicating template use 'R Markdown' manuscript. Default: 'APA6'. Available choices include APA6 papaja package, github_document, templates included rticles package. information, see add_manuscript. preregistration Character, indicating template use preregistration. Default: 'cos_prereg'. Available choices include: \"PSS\", \"Secondary\", \"None\", templates prereg package. information, see add_preregistration. add_license Character, indicating license include. Default: 'CC_BY_4.0'. Available options include: \"CC_BY_4.0\", \"CC_BY-SA_4.0\", \"CC_BY-NC_4.0\", \"CC_BY-NC-SA_4.0\", \"CC_BY-ND_4.0\", \"CC_BY-NC-ND_4.0\", \"None\". information, see https://creativecommons.org/licenses/. use_renv Logical, indicating whether use 'renv' make project reproducible. Default: TRUE. See init. use_targets Logical, indicating whether use 'targets' create Make-like pipeline. Default: FALSE See targets-package. remote_repo Character, address remote repository project. link form https://github.com[username][repo].git (preferred) git@[...].git (using SSH). valid remote repository link provided, commit made containing 'README.md' file, pushed remote repository. Default: 'https'. verbose Logical. Whether print messages console project creation. Default: TRUE ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create new WORCS project — worcs_project","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create new WORCS project — worcs_project","text":"","code":"the_test <- \"worcs_template\" old_wd <- getwd() dir.create(file.path(tempdir(), the_test)) do.call(git_user, worcs:::get_user()) #> To set the 'Git' username and email, call 'git_user()' with the argument 'overwrite = TRUE'. worcs_project(file.path(tempdir(), the_test, \"worcs_project\"), manuscript = \"github_document\", preregistration = \"None\", add_license = \"None\", use_renv = FALSE, remote_repo = \"https\") #> Called from: worcs_project(file.path(tempdir(), the_test, \"worcs_project\"), #> manuscript = \"github_document\", preregistration = \"None\", #> add_license = \"None\", use_renv = FALSE, remote_repo = \"https\") #> debug at C:/git_repositories/worcs/R/worcs_project.R#68: cl <- match.call(expand.dots = FALSE) #> debug at C:/git_repositories/worcs/R/worcs_project.R#71: manuscript <- tolower(manuscript) #> debug at C:/git_repositories/worcs/R/worcs_project.R#73: if (manuscript == \"target_markdown\") use_targets <- TRUE #> debug at C:/git_repositories/worcs/R/worcs_project.R#74: preregistration <- tolower(preregistration) #> debug at C:/git_repositories/worcs/R/worcs_project.R#75: add_license <- tolower(add_license) #> debug at C:/git_repositories/worcs/R/worcs_project.R#76: dots <- list(...) #> debug at C:/git_repositories/worcs/R/worcs_project.R#78: dir.create(path, recursive = TRUE, showWarnings = FALSE) #> debug at C:/git_repositories/worcs/R/worcs_project.R#79: path <- normalizePath(path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#81: use_git <- has_git() #> debug at C:/git_repositories/worcs/R/worcs_project.R#82: if (!use_git) { #> col_message(\"Could not find a working installation of 'Git', which is required to safeguard the transparency and reproducibility of your project. Please connect 'Git' by following the steps described in this vignette:\\n vignette('setup', package = 'worcs')\", #> success = FALSE) #> } else { #> col_message(\"Initializing 'Git' repository.\", verbose = verbose) #> git_init(path = path) #> } #> debug at C:/git_repositories/worcs/R/worcs_project.R#85: col_message(\"Initializing 'Git' repository.\", verbose = verbose) #> ✔ Initializing 'Git' repository. #> debug at C:/git_repositories/worcs/R/worcs_project.R#86: git_init(path = path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#90: tryCatch({ #> write_worcsfile(filename = file.path(path, \".worcs\"), worcs_version = as.character(packageVersion(\"worcs\")), #> creator = Sys.info()[\"effective_user\"]) #> col_message(\"Writing '.worcs' file.\", verbose = verbose) #> }, error = function(e) { #> col_message(\"Writing '.worcs' file.\", success = FALSE) #> }) #> debug at C:/git_repositories/worcs/R/worcs_project.R#91: write_worcsfile(filename = file.path(path, \".worcs\"), worcs_version = as.character(packageVersion(\"worcs\")), #> creator = Sys.info()[\"effective_user\"]) #> debug at C:/git_repositories/worcs/R/worcs_project.R#95: col_message(\"Writing '.worcs' file.\", verbose = verbose) #> ✔ Writing '.worcs' file. #> debug at C:/git_repositories/worcs/R/worcs_project.R#102: tryCatch({ #> copy_resources(which_files = c(\"README.md\", \"prepare_data.R\", #> \"worcs_icon.png\"), path = path) #> col_message(\"Copying standard files.\", verbose = verbose) #> }, error = function(e) { #> col_message(\"Copying standard files.\", success = FALSE) #> }) #> debug at C:/git_repositories/worcs/R/worcs_project.R#103: copy_resources(which_files = c(\"README.md\", \"prepare_data.R\", #> \"worcs_icon.png\"), path = path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#108: col_message(\"Copying standard files.\", verbose = verbose) #> ✔ Copying standard files. #> debug at C:/git_repositories/worcs/R/worcs_project.R#117: switch(manuscript, none = { #> write_as_utf(recommend_data, file.path(path, \"run_me.R\")) #> write_worcsfile(filename = file.path(path, \".worcs\"), entry_point = \"run_me.R\", #> modify = TRUE) #> add_recipe(worcs_directory = path, recipe = \"source('run_me.R')\") #> }, { #> cl[[1L]] <- quote(worcs::add_manuscript) #> names(cl)[which(names(cl) == \"path\")] <- \"worcs_directory\" #> eval(cl, parent.frame()) #> add_recipe(worcs_directory = path) #> }) #> debug at C:/git_repositories/worcs/R/worcs_project.R#130: cl[[1L]] <- quote(worcs::add_manuscript) #> debug at C:/git_repositories/worcs/R/worcs_project.R#131: names(cl)[which(names(cl) == \"path\")] <- \"worcs_directory\" #> debug at C:/git_repositories/worcs/R/worcs_project.R#132: eval(cl, parent.frame()) #> ✔ Creating manuscript files. #> debug at C:/git_repositories/worcs/R/worcs_project.R#133: add_recipe(worcs_directory = path) #> ✔ Adding recipe to '.worcs'. #> debug at C:/git_repositories/worcs/R/worcs_project.R#140: if (!preregistration == \"none\") { #> cl[[1L]] <- quote(worcs::add_preregistration) #> names(cl)[which(names(cl) == \"path\")] <- \"worcs_directory\" #> eval(cl, parent.frame()) #> } #> debug at C:/git_repositories/worcs/R/worcs_project.R#148: if (!add_license == \"none\") { #> tryCatch({ #> dir.create(path, recursive = TRUE, showWarnings = FALSE) #> license_dir = system.file(\"rstudio\", \"templates\", \"project\", #> \"licenses\", package = \"worcs\", mustWork = TRUE) #> license_file <- file.path(license_dir, paste0(add_license, #> \".txt\")) #> file.copy(license_file, file.path(path, \"LICENSE\"), copy.mode = FALSE) #> col_message(\"Writing license file.\", verbose = verbose) #> }, error = function(e) { #> col_message(\"Writing license file.\", success = FALSE) #> }) #> } #> debug at C:/git_repositories/worcs/R/worcs_project.R#165: if (use_targets) { #> if (require(\"targets\", quietly = TRUE) & require(\"tarchetypes\", #> quietly = TRUE)) { #> worcs::add_targets(worcs_directory = path, verbose = verbose) #> col_message(\"Initializing 'targets' for a Make-like pipeline.\", #> verbose = verbose) #> } #> } #> debug at C:/git_repositories/worcs/R/worcs_project.R#179: if (use_renv) { #> tryCatch({ #> init_fun <- get(\"init\", asNamespace(\"renv\")) #> do.call(init_fun, list(project = path, restart = FALSE)) #> col_message(\"Initializing 'renv' for a reproducible R environment.\", #> verbose = verbose) #> }, error = function(e) { #> col_message(\"Initializing 'renv' for a reproducible R environment.\", #> success = FALSE) #> }) #> } #> debug at C:/git_repositories/worcs/R/worcs_project.R#191: write(c(\".Rhistory\", \".Rprofile\", \"*.csv\", \"*.sav\", \"*.sas7bdat\", #> \"*.xlsx\", \"*.xls\", \"*.pdf\", \"*.fff\", \"*.log\", \"*.tex\"), file = file.path(path, #> \".gitignore\"), append = TRUE) #> debug at C:/git_repositories/worcs/R/worcs_project.R#205: if (file.exists(file.path(path, \"README.md\"))) { #> cont <- readLines(file.path(path, \"README.md\"), encoding = \"UTF-8\") #> f <- list.files(path) #> tab <- matrix(c(\"File\", \"Description\", \"Usage\", \"README.md\", #> \"Description of project\", \"Human editable\"), nrow = 2, #> byrow = TRUE) #> rproj_name <- paste0(basename(path), \".Rproj\") #> cont[which(startsWith(cont, \"You can load this project in RStudio by opening the file\"))] <- paste0(\"You can load this project in RStudio by opening the file called '\", #> rproj_name, \"'.\") #> tab <- rbind(tab, c(rproj_name, \"Project file\", \"Loads project\")) #> tab <- describe_file(\"LICENSE\", \"User permissions\", \"Read only\", #> tab, path) #> tab <- describe_file(\".worcs\", \"WORCS metadata YAML\", \"Read only\", #> tab, path) #> tab <- describe_file(\"preregistration.rmd\", \"Preregistered hypotheses\", #> \"Human editable\", tab, path) #> tab <- describe_file(\"prepare_data.R\", \"Script to process raw data\", #> \"Human editable\", tab, path) #> tab <- describe_file(\"manuscript/manuscript.rmd\", \"Source code for paper\", #> \"Human editable\", tab, path) #> tab <- describe_file(\"manuscript/references.bib\", \"BibTex references for manuscript\", #> \"Human editable\", tab, path) #> tab <- describe_file(\"renv.lock\", \"Reproducible R environment\", #> \"Read only\", tab, path) #> tab <- nice_tab(tab) #> cont <- append(cont, tab, after = grep(\"You can add rows to this table\", #> cont)) #> write_as_utf(cont, file.path(path, \"README.md\")) #> } #> debug at C:/git_repositories/worcs/R/worcs_project.R#206: cont <- readLines(file.path(path, \"README.md\"), encoding = \"UTF-8\") #> debug at C:/git_repositories/worcs/R/worcs_project.R#207: f <- list.files(path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#208: tab <- matrix(c(\"File\", \"Description\", \"Usage\", \"README.md\", #> \"Description of project\", \"Human editable\"), nrow = 2, byrow = TRUE) #> debug at C:/git_repositories/worcs/R/worcs_project.R#210: rproj_name <- paste0(basename(path), \".Rproj\") #> debug at C:/git_repositories/worcs/R/worcs_project.R#211: cont[which(startsWith(cont, \"You can load this project in RStudio by opening the file\"))] <- paste0(\"You can load this project in RStudio by opening the file called '\", #> rproj_name, \"'.\") #> debug at C:/git_repositories/worcs/R/worcs_project.R#212: tab <- rbind(tab, c(rproj_name, \"Project file\", \"Loads project\")) #> debug at C:/git_repositories/worcs/R/worcs_project.R#213: tab <- describe_file(\"LICENSE\", \"User permissions\", \"Read only\", #> tab, path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#214: tab <- describe_file(\".worcs\", \"WORCS metadata YAML\", \"Read only\", #> tab, path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#215: tab <- describe_file(\"preregistration.rmd\", \"Preregistered hypotheses\", #> \"Human editable\", tab, path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#216: tab <- describe_file(\"prepare_data.R\", \"Script to process raw data\", #> \"Human editable\", tab, path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#217: tab <- describe_file(\"manuscript/manuscript.rmd\", \"Source code for paper\", #> \"Human editable\", tab, path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#218: tab <- describe_file(\"manuscript/references.bib\", \"BibTex references for manuscript\", #> \"Human editable\", tab, path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#219: tab <- describe_file(\"renv.lock\", \"Reproducible R environment\", #> \"Read only\", tab, path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#221: tab <- nice_tab(tab) #> debug at C:/git_repositories/worcs/R/worcs_project.R#222: cont <- append(cont, tab, after = grep(\"You can add rows to this table\", #> cont)) #> debug at C:/git_repositories/worcs/R/worcs_project.R#223: write_as_utf(cont, file.path(path, \"README.md\")) #> debug at C:/git_repositories/worcs/R/worcs_project.R#227: if (use_git) { #> tryCatch({ #> git_add(files = \"README.md\", repo = path) #> git_commit(message = \"worcs template initial commit\", #> repo = path) #> col_message(\"Creating first commit (committing README.md).\", #> verbose = verbose) #> }, error = function(e) { #> col_message(\"Creating first commit (committing README.md).\", #> success = FALSE) #> }) #> } #> debug at C:/git_repositories/worcs/R/worcs_project.R#228: tryCatch({ #> git_add(files = \"README.md\", repo = path) #> git_commit(message = \"worcs template initial commit\", repo = path) #> col_message(\"Creating first commit (committing README.md).\", #> verbose = verbose) #> }, error = function(e) { #> col_message(\"Creating first commit (committing README.md).\", #> success = FALSE) #> }) #> debug at C:/git_repositories/worcs/R/worcs_project.R#229: git_add(files = \"README.md\", repo = path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#230: git_commit(message = \"worcs template initial commit\", repo = path) #> debug at C:/git_repositories/worcs/R/worcs_project.R#231: col_message(\"Creating first commit (committing README.md).\", #> verbose = verbose) #> ✔ Creating first commit (committing README.md). #> debug at C:/git_repositories/worcs/R/worcs_project.R#238: repo_url <- parse_repo(remote_repo = remote_repo, verbose = verbose) #> ✖ Not a valid 'Git' remote repository address: https #> debug at C:/git_repositories/worcs/R/worcs_project.R#239: valid_repo <- !is.null(repo_url) #> debug at C:/git_repositories/worcs/R/worcs_project.R#240: if (use_git & valid_repo) { #> tryCatch({ #> Args_gert <- list(\"origin\", url = remote_repo, repo = path) #> if (\"remote\" %in% formalArgs(git_remote_add)) { #> names(Args_gert)[1] <- \"remote\" #> } #> else { #> names(Args_gert)[1] <- \"name\" #> } #> do.call(git_remote_add, Args_gert) #> git_push(remote = \"origin\", repo = path) #> col_message(paste0(\"Connected to remote repository at \", #> remote_repo), verbose = verbose) #> }, error = function(e) { #> col_message(\"Could not connect to a remote 'GitHub' repository. You are working with a local 'Git' repository only.\", #> success = FALSE, verbose = verbose) #> }) #> } else { #> col_message(\"No valid 'GitHub' address provided. You are working with a local 'Git' repository only.\", #> success = FALSE) #> } #> debug at C:/git_repositories/worcs/R/worcs_project.R#260: col_message(\"No valid 'GitHub' address provided. You are working with a local 'Git' repository only.\", #> success = FALSE) #> ✖ No valid 'GitHub' address provided. You are working with a local 'Git' repository only. #> debug at C:/git_repositories/worcs/R/worcs_project.R#262: if (\"GCtorture\" %in% ls()) rm(\"GCtorture\") setwd(old_wd) unlink(file.path(tempdir(), the_test))"},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0115","dir":"Changelog","previous_headings":"","what":"worcs 0.1.15","title":"worcs 0.1.15","text":"Add integration targets package","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0114","dir":"Changelog","previous_headings":"","what":"worcs 0.1.14","title":"worcs 0.1.14","text":"CRAN release: 2023-10-25 Fix checksum calculated indirectly (e.g., Rmarkdown code chunk) Fix error r-release-linux-x86_64 Fix documentation; replace tags tags Improve handling relative file paths worcs:::save_data()","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0113","dir":"Changelog","previous_headings":"","what":"worcs 0.1.13","title":"worcs 0.1.13","text":"CRAN release: 2023-10-04 Address Prof. Brian Ripley’s comment: “Packages Suggests used conditionally: see ‘Writing R Extensions’. needs corrected even missing package(s) become available. can tested checking _R_CHECK_DEPENDS_ONLY_=true.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0112","dir":"Changelog","previous_headings":"","what":"worcs 0.1.12","title":"worcs 0.1.12","text":"CRAN release: 2023-09-13 Add functions add_recipe() reproduce() check_worcs_installation() longer throws error rticles prereg Add defensive programming save_data() load_data() prevent errors. improvement checksums computed; instead checking Git treats line endings (breaks project longer version controlled, e.g., downloading ZIP GitHub), check files binary. Add github action reproduce repo via github actions: github_action_reproduce() Update vignette(\"Reproduce\"); advice download ZIP GitHub bad practice, ZIP longer version controlled Git.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0111","dir":"Changelog","previous_headings":"","what":"worcs 0.1.11","title":"worcs 0.1.11","text":"CRAN release: 2023-08-22 Checksums computed differently preceding versions, account fact Git changes end line characters breaks consistency checksums across operating systems. Add endpoint functionality: add_endpoint(), snapshot_endpoints(), check_endpoints() Add github action endpoints: github_action_check_endpoints() Improve handling relative filenames save_data() fix bug related file path codebook metadata add function report()","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0110","dir":"Changelog","previous_headings":"","what":"worcs 0.1.10","title":"worcs 0.1.10","text":"CRAN release: 2022-07-20 Fix breaking bug check_worcs_installation() introduced version 0.1.9 Update setup vignette reflect new GitHub authentication protocols","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-019","dir":"Changelog","previous_headings":"","what":"worcs 0.1.9","title":"worcs 0.1.9","text":"CRAN release: 2022-07-16 closed_data() open_data() now store factor ordered value labels YAML file Added functions data_unlabel() data_label(), respectively coerce factors integer, restore integers factors using metadata stored YAML file load_data() attempts coerce variable classes using codebook, restores ordered levels value_labels YAML file Update templates rticles prereg packages Add check_worcs_installation() function determine whether non-R-package dependencies installed correctly Update references WORCS paper Replace GitHub version papaja CRAN version Fix URLs Update rticles prereg templates Handle literal function names rticles prereg, users can use available options packages without worcs explicitly referencing functions Add arguments ‘save_expression’ ‘load_expression’ closed_data() open_data(). allows users save data different formats. ‘load_expression’ stored .worcs file, referenced load_data().","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-018","dir":"Changelog","previous_headings":"","what":"worcs 0.1.8","title":"worcs 0.1.8","text":"CRAN release: 2021-02-02 Declared pandoc SystemRequirements Made examples using pandoc conditional availability pandoc Functions wrap rmarkdown::render() now return NULL pandoc available","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-017","dir":"Changelog","previous_headings":"","what":"worcs 0.1.7","title":"worcs 0.1.7","text":"CRAN release: 2021-01-21 Fixed failing tests requested dr. Brian Ripley","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-016","dir":"Changelog","previous_headings":"","what":"worcs 0.1.6","title":"worcs 0.1.6","text":"CRAN release: 2020-12-16 Workflow vignette updated address reviewer comments “Data Science” New functions: add_synthetic() notify_synthetic() closed_data() longer wraps errors call synthetic(). Thus, function call fails error data synthesis fails. closed_data() now passes formal arguments synthetic() contained ‘…’ synthetic(). synthetic() now allows ‘y’ referenced ‘predict_expression’ ‘model_expression’ set NULL, thereby enabling bootstrapping. internal function worcs:::col_message() now renders status messages black print instead colored print rmarkdown::render() callstack. avoids errors knitting PDF. See https://github.com/rstudio/rmarkdown/issues/1951 error circumvented fix.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-015","dir":"Changelog","previous_headings":"","what":"worcs 0.1.5","title":"worcs 0.1.5","text":"CRAN release: 2020-10-09 Necessary update due breaking changes dependency gert package Add function add_preregistration() add preregistration later stage Add preregistration templates “PSS” “Secondary”","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-014","dir":"Changelog","previous_headings":"","what":"worcs 0.1.4","title":"worcs 0.1.4","text":"CRAN release: 2020-09-29 Fixed bugs handling filenames open_data() closed_data() codebook.Rmd name object supplied ‘data’ argument default, open_data() closed_data() now construct filenames .csv codebook.Rmd name object supplied ‘data’ argument. also means object loaded name load_data(). Add function add_manuscript() add manuscript later stage Major bugfixes worcs_badge(); function work intended. Fixed now","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-013","dir":"Changelog","previous_headings":"","what":"worcs 0.1.3","title":"worcs 0.1.3","text":"CRAN release: 2020-06-27 Minor bugfixes descriptives() now returns mean() instead sd() descriptives() now returns n missing README.md now correctly shows .Rproj file rticles now declared import","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-012","dir":"Changelog","previous_headings":"","what":"worcs 0.1.2","title":"worcs 0.1.2","text":"CRAN release: 2020-05-30 documentation updated ensure compatibility submitted version WORCS-paper. Authors references WORCS-paper updated include co-authors. Prevent git_user() engaging antisocial behavior, resetting users’ ‘Git’ credentials, adding default argument ‘overwrite = !has_git_user()’. default, function nothing ‘Git’ user credentials already exist. Bug fix load_data() ensure compatibility ‘RMarkdown’ behavior running code chunks .Rmd file directory, instead actual working directory. Bug fix cite_all() cite_essential() allow escaping literal double @. Bug fix export_project(), now respects folder structure within project, also supports relative paths ensure portability, even called different working working directory. Fixing bug required changing working directory calling zip(). change working directory immediately followed call .exit(setwd(oldwd)), line CRAN policy. .worcs file used determine existence worcs-project recursively. .worcs file now tracks entry point analyses.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-011","dir":"Changelog","previous_headings":"","what":"worcs 0.1.1","title":"worcs 0.1.1","text":"CRAN release: 2020-05-18 First CRAN release.","code":""}] +[{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"adding-endpoints","dir":"Articles","previous_headings":"","what":"Adding endpoints","title":"Using Endpoints to Check Reproducibility","text":"Users can add endpoints using function add_endpoint(\"filename\"). running function, filename added .worcs project file, checksum computed changes contents file can detected. also possible specify multiple endpoints. example, maybe user finalized analyses, wants track reproducibility analysis results - still wants make changes text manuscript without breaking reproducibility checks. case, useful track files contain analysis results instead rendered manuscript. Imagine intermediary files analysis results: descriptives.csv: file descriptive statistics study variables model_fit.csv: table model fit indices several models finalmodel.RData: RData file results final model three files tracked endpoints calling add_endpoint(\"descriptives.csv\"); add_endpoint(\"model_fit.csv\"); add_endpoint(\"finalmodel.RData\").","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"reproducing-a-project","dir":"Articles","previous_headings":"","what":"Reproducing a Project","title":"Using Endpoints to Check Reproducibility","text":"WORCS project can reproduced evaluating function reproduce(). function evaluates recipe defined .worcs project file. recipe specified (e.g., project created older version package), entry point defined, reproduce() try evaluate entry point Rmarkdown R source file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"checking-reproducibility","dir":"Articles","previous_headings":"","what":"Checking reproducibility","title":"Using Endpoints to Check Reproducibility","text":"Users can verify endpoint remains unchanged reproducing project calling function check_endpoints(). endpoint changed relative version stored .worcs project file, result warning message.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"updating-endpoints","dir":"Articles","previous_headings":"","what":"Updating endpoints","title":"Using Endpoints to Check Reproducibility","text":"update endpoints .worcs file, call snapshot_endpoints(). Always call function log changes code result different end result.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"automating-reproducibility","dir":"Articles","previous_headings":"","what":"Automating Reproducibility","title":"Using Endpoints to Check Reproducibility","text":"project connected remote repository GitHub, possible use GitHub actions automatically check project’s reproducibility signal result reproducibility check displaying badge project’s readme page (welcome page visitors GitHub repository first see). , follow steps: Add endpoint using add_endpoint(); example, endpoint analyses file called 'manuscript/manuscript.md', call add_endpoint('manuscript/manuscript.md') Run github_action_reproduce() [![worcs_endpoints](https://github.com/YOUR_ACCOUNT/PROJECT_REPOSITORY/actions/workflows/worcs_reproduce.yaml/badge.svg)](https://github.com/YOUR_ACCOUNT/PROJECT_REPOSITORY/actions/worcs_reproduce.yaml/worcs_endpoints.yaml) Commit changes GitHub using git_update() Visit project page GitHub select Actions tab see reproducibility check running; visit main project page see new badge readme.md file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/endpoints.html","id":"automating-endpoint-checks","dir":"Articles","previous_headings":"","what":"Automating Endpoint Checks","title":"Using Endpoints to Check Reproducibility","text":"Sometimes, may wish verify endpoints project remain without reproducing analyses GitHub’s servers. may case project closed data available GitHub, analyses take long time compute want prevent using unnecessary compute power (e.g., environmental reasons). cases, can still use GitHub actions automatically check whether endpoints remained unchanged. local changes project introduce deviations endpoint snapshots, tests fail. make intentional changes endpoints, course run snapshot_endpoints(). can display badge project’s readme page signal endpoints remain unchanged. , follow steps: Add endpoint using add_endpoint(); example, endpoint analyses file called 'manuscript/manuscript.md', call add_endpoint('manuscript/manuscript.md') Run github_action_check_endpoints() [![worcs_endpoints](https://github.com/YOUR_ACCOUNT/PROJECT_REPOSITORY/actions/workflows/worcs_endpoints.yaml/badge.svg)](https://github.com/YOUR_ACCOUNT/PROJECT_REPOSITORY/actions/workflows/worcs_endpoints.yaml) Commit changes GitHub using git_update() Visit project page GitHub select Actions tab see reproducibility check running; visit main project page see new badge readme.md file.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/articles/git_cloud.html","id":"setup-steps-do-this-only-once","dir":"Articles","previous_headings":"GitLab","what":"Setup steps (do this only once)","title":"Connecting to 'Git' remote repositories","text":"‘GitLab’ website looks feels almost identical ‘GitHub’. Steps 4 5 setup vignette can applied nearly without alterations. connect worcs ‘GitLab’, proceeded follows: Go gitlab.com click Register now. Choose “Individual”, “Free” plan. Request free academic upgrade. Open ‘RStudio’, open Tools menu, click Global Options, click Git/SVN Verify Enable version control interface RStudio projects selected Verify Git executable: shows location git.exe. missing, manually fix location file. Click Create RSA Key. enter passphrase. Press Create. window information open, can close. Click View public key, copy entire text clipboard. Close ‘RStudio’ (might offer restart ; fine) Go gitlab.com Click user icon top right screen, click Settings settings page, click SSH Keys left sidebar Copy-paste public key clipboard box labeled Key. Click Add key. Open ‘RStudio’ (unless restarted )","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/git_cloud.html","id":"connect-new-worcs-project-to-gitlab","dir":"Articles","previous_headings":"GitLab","what":"Connect new worcs project to ‘GitLab’","title":"Connecting to 'Git' remote repositories","text":"create new project ‘GitLab’, go account page, click Create project tile middle screen. Fill Project name; change anything else. Click green Create project button. see page titled “repository project empty”. header “Create new repository”, can see web address starting https, like :git clone https://gitlab.com/yourname/yourrepo.git Copy address, https:// .git. Paste address New project dialog window.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/articles/git_cloud.html","id":"setup-steps-do-this-only-once-1","dir":"Articles","previous_headings":"Bitbucket","what":"Setup steps (do this only once)","title":"Connecting to 'Git' remote repositories","text":"‘Bitbucket’ website cosmetic differences ‘GitHub’, works similarly. Steps 4 5 setup vignette can applied nearly without alterations. connect worcs ‘Bitbucket’, proceeded follows: Go Bitbucket website click Get started free. Follow steps create account. Sign . Bitbucket largely automated process awarding free academic upgrades. email address recognized belonging academic institution, can fill form request upgrade manually. Open ‘RStudio’, open Tools menu, click Global Options, click Git/SVN Verify Enable version control interface RStudio projects selected Verify Git executable: shows location git.exe. missing, manually fix location file. Click Create RSA Key. enter passphrase. Press Create. window information open, can close. Click View public key, copy entire text clipboard. Close ‘RStudio’ (might offer restart ; fine) Go Bitbucket website bottom left screen, click circular icon initials. Select Personal settings settings page, click SSH Keys left sidebar Click Add key Copy-paste public key clipboard box labeled Key, give label. Click Add key button. Open ‘RStudio’ (unless restarted )","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/git_cloud.html","id":"connect-new-worcs-project-to-bitbucket","dir":"Articles","previous_headings":"Bitbucket","what":"Connect new worcs project to ‘Bitbucket’","title":"Connecting to 'Git' remote repositories","text":"create new project ‘Bitbucket’, go account page, click Create repository middle page. steps differ somewhat procedure ‘GitHub’: Enter Project name Repository name. latter used connect worcs project. Important: Change setting Include README? . Click “Create repository” project page opens, see tagline “Let’s put bits bucket”. Change dropdown menu Just tagline SSH https. show web address starting https, like :git clone https://yourname@bitbucket.org/yourrepo.git Copy address, https:// .git. Paste address New project dialog window.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"install-rstudio-and-r","dir":"Articles","previous_headings":"","what":"Install ‘RStudio’ and ‘R’","title":"Reproducing a WORCS project","text":"can skip steps recent working installation ‘RStudio’ ‘R’. Install R (free) Install ‘RStudio’ Desktop (Free)","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"install-r-package-dependencies","dir":"Articles","previous_headings":"","what":"Install R-package dependencies","title":"Reproducing a WORCS project","text":"receive error saying package called [package name], run code install.packages(\"package name\") prompted update packages, just press [ENTER] avoid updating packages. Updating packages way interactive session sometimes leads errors packages loaded. see pop-dialog asking want install sources package needs compilation?, click .","code":"install.packages(\"worcs\", dependencies = TRUE) tinytex::install_tinytex() renv::consent(provided = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"obtaining-the-project-repository","dir":"Articles","previous_headings":"","what":"Obtaining the project repository","title":"Reproducing a WORCS project","text":"WORCS projects typically hosted ‘GitHub’, another ‘Git’ remote repository. recommended way obtain local copy project repository “clone” . ‘GitHub’, done clicking green button labeled “Code”. Clicking reveals HTTPS link project repository (see ). Copy link clipboard clicking clipboard icon next . Next, open RStudio instance run following code console, replacing https://github.com/username/reponame.git HTTPS address just copied clipboard, replacing c:///want//repo location hard drive want clone repository: Note: also possible download compressed (ZIP) archive containing project (see image ), important limitation: repository downloaded via GitHub interface , , Git repository! peculiarity GitHub interface. might result unexpected behavior using WORCS functionality relies Git version control. Thus, general rule, advise cloning projects instead.","code":"gert::git_clone(\"https://github.com/username/reponame.git\", path = \"c:/where/you/want/the/repo\")"},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"open-the-project-in-rstudio","dir":"Articles","previous_headings":"","what":"Open the project in ‘RStudio’","title":"Reproducing a WORCS project","text":"projects can opened loading ‘.RProj’ file main folder. explained project ‘README.md’ well.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"restore-the-package-dependencies","dir":"Articles","previous_headings":"","what":"Restore the package dependencies","title":"Reproducing a WORCS project","text":"need restore packages used authors, using renv package. See article information renv. project open ‘RStudio’, type following console:","code":"renv::restore()"},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"open-the-project-entry-point","dir":"Articles","previous_headings":"","what":"Open the project entry point","title":"Reproducing a WORCS project","text":"entry point core document can executed reproduce analysis. typically manuscript, occasionally R-script file. Use following function open entry point file ‘RStudio’:","code":"load_entrypoint()"},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"reproduce-the-analyses","dir":"Articles","previous_headings":"","what":"Reproduce the analyses","title":"Reproducing a WORCS project","text":"worcs version 0.1.12, projects can reproduced using function reproduce(). function evaluate reproducibility recipe stored .worcs project file, checks whether resulting endpoints correct checksums (.e., unchanged relative authors’ original work).","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/reproduce.html","id":"no-access-to-original-data","dir":"Articles","previous_headings":"","what":"No access to original data","title":"Reproducing a WORCS project","text":"Sometimes, authors made original data available. case, project contain synthetic data file similar properties original data. synthetic data allows verify analyses can run, code correct. results , however, deviate original findings substantively interpreted. Authors may use function notify_synthetic() generate message paper synthetic dataset used. Authors also provide information README.md file obtain access original data case audit warranted. Please read WORCS paper [@vanlissaWORCSWorkflowOpen2021] information checksums used auditors can verify authenticity original data.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/setup.html","id":"optional-step","dir":"Articles","previous_headings":"","what":"Optional step","title":"Setting up your computer for WORCS","text":"intend write documents APA style, additionally install papaja package. papaja many dependencies, recommended skip step intend write documents different style APA. Unfortunately, package yet available central R repository CRAN, can install ‘GitHub’ using following code:","code":"install.packages(\"papaja\", dependencies = TRUE, update = \"never\")"},{"path":"https://cjvanlissa.github.io/worcs/articles/synthetic_data.html","id":"generating-data-from-a-structural-equation-model","dir":"Articles","previous_headings":"","what":"Generating Data from a Structural Equation Model","title":"Using Custom Synthetic Data","text":"Structural equation models may problems converging estimated synthetic datasets. avoid problem, synthetic data can generated directly SEM model. Generating data SEM model often result synthetic dataset closely reproduce model parameters estimated original dataset.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/synthetic_data.html","id":"illustrating-the-problem","dir":"Articles","previous_headings":"Generating Data from a Structural Equation Model","what":"Illustrating the Problem","title":"Using Custom Synthetic Data","text":"example, use PoliticalDemocracy data included lavaan package. Imagine collected data, allowed share . existing worcs project, store using command: Now, estimate SEM-model, based example lavaan documentation: work fine. someone tries reproduce analysis? access original data, synthetic dataset. simulate experience reproducing analysis, can load synthetic dataset try run model: result several warnings, negative latent variable variances (impossibility) warning observed covariance matrix residuals positive definite. words: model fit synthetic data, structure data adequately reproduced default algorithm synthetic().","code":"library(lavaan) library(tidySEM) set.seed(4) dat <- PoliticalDemocracy closed_data(dat) load_data() model <- ' ind60 =~ x1 + x2 + x3 dem60 =~ y1 + a*y2 + b*y3 + c*y4 dem65 =~ y5 + a*y6 + b*y7 + c*y8 # regressions dem60 ~ ind60 dem65 ~ ind60 + dem60 # residual correlations y1 ~~ y5 y2 ~~ y4 + y6 y3 ~~ y7 y4 ~~ y8 y6 ~~ y8' fit <- lavaan::sem(model, data = dat) tidySEM::table_results(fit) #> label est_sig se pval confint #> 1 ind60.BY.x1 1.00 0.00 [1.00, 1.00] #> 2 ind60.BY.x2 2.18*** 0.14 0.00 [1.91, 2.45] #> 3 ind60.BY.x3 1.82*** 0.15 0.00 [1.52, 2.12] #> 4 dem60.BY.y1 1.00 0.00 [1.00, 1.00] #> 5 dem60.BY.y2 1.19*** 0.14 0.00 [0.92, 1.46] #> 6 dem60.BY.y3 1.17*** 0.12 0.00 [0.94, 1.41] #> 7 dem60.BY.y4 1.25*** 0.12 0.00 [1.02, 1.48] #> 8 dem65.BY.y5 1.00 0.00 [1.00, 1.00] #> 9 dem65.BY.y6 1.19*** 0.14 0.00 [0.92, 1.46] #> 10 dem65.BY.y7 1.17*** 0.12 0.00 [0.94, 1.41] #> 11 dem65.BY.y8 1.25*** 0.12 0.00 [1.02, 1.48] #> 12 dem60.ON.ind60 1.47*** 0.39 0.00 [0.70, 2.24] #> 13 dem65.ON.ind60 0.60** 0.23 0.01 [0.16, 1.04] #> 14 dem65.ON.dem60 0.87*** 0.07 0.00 [0.72, 1.01] #> 15 y1.WITH.y5 0.58 0.36 0.10 [-0.11, 1.28] #> 16 y2.WITH.y4 1.44* 0.69 0.04 [0.09, 2.79] #> 17 y2.WITH.y6 2.18** 0.74 0.00 [0.74, 3.63] #> 18 y3.WITH.y7 0.71 0.61 0.24 [-0.49, 1.91] #> 19 y4.WITH.y8 0.36 0.44 0.41 [-0.51, 1.23] #> 20 y6.WITH.y8 1.37* 0.58 0.02 [0.24, 2.50] #> 21 Variances.x1 0.08*** 0.02 0.00 [0.04, 0.12] #> 22 Variances.x2 0.12 0.07 0.08 [-0.02, 0.26] #> 23 Variances.x3 0.47*** 0.09 0.00 [0.29, 0.64] #> 24 Variances.y1 1.85*** 0.43 0.00 [1.01, 2.70] #> 25 Variances.y2 7.58*** 1.37 0.00 [4.90, 10.26] #> 26 Variances.y3 4.96*** 0.96 0.00 [3.08, 6.83] #> 27 Variances.y4 3.22*** 0.72 0.00 [1.81, 4.64] #> 28 Variances.y5 2.31*** 0.48 0.00 [1.37, 3.25] #> 29 Variances.y6 4.97*** 0.92 0.00 [3.16, 6.77] #> 30 Variances.y7 3.56*** 0.71 0.00 [2.17, 4.95] #> 31 Variances.y8 3.31*** 0.70 0.00 [1.93, 4.69] #> 32 Variances.ind60 0.45*** 0.09 0.00 [0.28, 0.62] #> 33 Variances.dem60 3.88*** 0.87 0.00 [2.18, 5.57] #> 34 Variances.dem65 0.16 0.23 0.47 [-0.28, 0.61] dat2 <- read.csv(\"synthetic_dat.csv\", stringsAsFactors = FALSE) fit2 <- lavaan::sem(model, data = dat2) #> Warning: lavaan->lav_object_post_check(): #> some estimated lv variances are negative #> Warning: lavaan->lav_object_post_check(): #> the covariance matrix of the residuals of the observed variables (theta) #> is not positive definite ; use lavInspect(fit, \"theta\") to investigate."},{"path":"https://cjvanlissa.github.io/worcs/articles/synthetic_data.html","id":"adding-a-custom-dataset","dir":"Articles","previous_headings":"Generating Data from a Structural Equation Model","what":"Adding a Custom Dataset","title":"Using Custom Synthetic Data","text":"dataset generated model much better able reproduce model. , let’s use SEM model generate synthetic dataset: Note function simulateData() accepts parameter table argument, must first extracted fitted model object using partable(). add custom synthetic dataset original dataset, use function . Note original_name reference file name data synthetic dataset associated , name R-object. started R-object called dat, saved file called dat.csv using function closed_data(). now remove original data, call load_data() , can verify synthetic dataset loaded, can see ’s possible reproduce analysis - exact results - :","code":"set.seed(33) dat_synthetic <- lavaan::simulateData(model = lavaan::partable(fit)) add_synthetic(dat_synthetic, original_name = \"dat.csv\") file.remove(\"dat.csv\") load_data() fit2 <- lavaan::sem(model, data = dat) tidySEM::table_results(fit2) #> [1] TRUE #> label est_sig se pval confint #> 1 ind60.BY.x1 1.00 0.00 [1.00, 1.00] #> 2 ind60.BY.x2 2.15*** 0.05 0.00 [2.05, 2.25] #> 3 ind60.BY.x3 1.78*** 0.06 0.00 [1.67, 1.90] #> 4 dem60.BY.y1 1.00 0.00 [1.00, 1.00] #> 5 dem60.BY.y2 1.15*** 0.05 0.00 [1.06, 1.25] #> 6 dem60.BY.y3 1.13*** 0.04 0.00 [1.04, 1.21] #> 7 dem60.BY.y4 1.13*** 0.04 0.00 [1.05, 1.21] #> 8 dem65.BY.y5 1.00 0.00 [1.00, 1.00] #> 9 dem65.BY.y6 1.15*** 0.05 0.00 [1.06, 1.25] #> 10 dem65.BY.y7 1.13*** 0.04 0.00 [1.04, 1.21] #> 11 dem65.BY.y8 1.13*** 0.04 0.00 [1.05, 1.21] #> 12 dem60.ON.ind60 1.51*** 0.16 0.00 [1.20, 1.82] #> 13 dem65.ON.ind60 0.75*** 0.09 0.00 [0.57, 0.93] #> 14 dem65.ON.dem60 0.86*** 0.03 0.00 [0.80, 0.91] #> 15 y1.WITH.y5 0.52*** 0.14 0.00 [0.25, 0.79] #> 16 y2.WITH.y4 1.79*** 0.26 0.00 [1.27, 2.30] #> 17 y2.WITH.y6 1.74*** 0.24 0.00 [1.26, 2.22] #> 18 y3.WITH.y7 0.80** 0.24 0.00 [0.32, 1.28] #> 19 y4.WITH.y8 0.53*** 0.16 0.00 [0.21, 0.84] #> 20 y6.WITH.y8 1.46*** 0.21 0.00 [1.04, 1.88] #> 21 Variances.x1 0.07*** 0.01 0.00 [0.06, 0.08] #> 22 Variances.x2 0.10*** 0.02 0.00 [0.06, 0.15] #> 23 Variances.x3 0.48*** 0.03 0.00 [0.41, 0.55] #> 24 Variances.y1 1.83*** 0.18 0.00 [1.48, 2.17] #> 25 Variances.y2 6.85*** 0.48 0.00 [5.90, 7.80] #> 26 Variances.y3 5.22*** 0.39 0.00 [4.46, 5.98] #> 27 Variances.y4 3.33*** 0.27 0.00 [2.80, 3.87] #> 28 Variances.y5 1.98*** 0.17 0.00 [1.64, 2.32] #> 29 Variances.y6 4.32*** 0.32 0.00 [3.70, 4.94] #> 30 Variances.y7 3.62*** 0.28 0.00 [3.07, 4.17] #> 31 Variances.y8 3.38*** 0.27 0.00 [2.86, 3.90] #> 32 Variances.ind60 0.43*** 0.03 0.00 [0.37, 0.49] #> 33 Variances.dem60 4.10*** 0.35 0.00 [3.41, 4.79] #> 34 Variances.dem65 0.25** 0.10 0.01 [0.06, 0.44]"},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"worcs-steps-to-follow-for-a-project","dir":"Articles","previous_headings":"","what":"WORCS: Steps to follow for a project","title":"The WORCS workflow, version 0.1.6","text":"vignette describes Workflow Open Reproducible Code Science, introduced Van Lissa et al. (2021). paper describes rationale principled approach workflow based; vignette describes practical steps R-users greater detail. Note , although steps numbered reference purposes, acknowledge process conducting research always linear. workflow illustrated graph , optional steps displayed blue nodes:","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"phase-1-study-design","dir":"Articles","previous_headings":"WORCS: Steps to follow for a project","what":"Phase 1: Study design","title":"The WORCS workflow, version 0.1.6","text":"inexperienced users, recommend making repository “Private”, means selected co-authors can access . can set “Public” later - example, paper goes print - entire history Repository public record. recommend making repository “Public” start experienced user know . Copy repository link clipboard; link look something like https://github.com/username/repository.git Paste remote Repository address textbox. address look like https://github.com/username/repository.git Keep checkbox renv checked want use dependency management (recommended) Select preregistration template, add preregistration later using add_preregistration() Select manuscript template, add manuscript later using add_manuscript() Select license project (recommend CC-license, allows free use licensed material long creator credited) template README.md file automatically generated project creation. Edit template explain users interact project. Based selections New Project dialog, LICENSE also added project, explain users’ rights limit liability. recommend CC-license, allows free use licensed material long creator credited. Document study plans preregistration.Rmd file, optionally, planned analyses .R file. top-right panel ‘RStudio’, select ‘Git’ tab Select checkbox next preregistration file(s) Click Commit button. pop-window, write informative “Commit message”, e.g., “Preregistration” Click Commit button message dialog Click green arrow labeled “Push” send commit ‘Git’ remote repository Tag commit release remote repository, using label “preregistration”. tagged release helps others retrieve commit. Instructions ‘GitHub’ explained ‘RStudio’, file ‘preregistration.Rmd’ open, click “Knit” button top left panel PDF generated, go one recognized preregistration services’ websites, create new preregistration, upload attachment. Optional: Generate DOI preregistration OSF service like Zenodo study materials rights, materials’ license allows can solicit feedback outside contributions ‘Git’ remote repository opening “Issue” accepting “Pull requests”","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"phase-2-writing-and-analysis","dir":"Articles","previous_headings":"WORCS: Steps to follow for a project","what":"Phase 2: Writing and analysis","title":"The WORCS workflow, version 0.1.6","text":"Document preprocessing (“data wrangling”) procedure prepare_data.R file. file intended document steps can replicated end users, unless access raw data file. steps run , first time load data R. Make file short possible; include steps absolutely necessary WARNING: commit data file ‘Git’ repository, record retained forever (unless entire repository deleted). Assume pushing data ‘Git’ remote repository undone. Follow mantra: “Never commit something intend share”. using external data sources (e.g., obtained using API), recommended store local copy, make project portable ensure end users access version data used. Use code chunks perform analyses. first code chunk call load_data() Finish sentence one carriage return (enter); separate paragraphs double carriage return. top-right panel ‘RStudio’, select ‘Git’ tab Select checkboxes next files whose changes wish Commit Click Commit button. pop-window, write informative “Commit message”. Click Commit button message dialog Click green arrow labeled “Push” send commit remote repository writing, cite essential references one -symbol, [@essentialref2020], non-essential references double -symbol, [@@nonessential2020].","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"phase-3-submission-and-publication","dir":"Articles","previous_headings":"WORCS: Steps to follow for a project","what":"Phase 3: Submission and publication","title":"The WORCS workflow, version 0.1.6","text":"Use dependency management make computational environment fully reproducible. using renv, can save state project library (packages used) calling renv::snapshot(). updates lockfile, renv.lock. adds WORCS-badge ‘README.md’ file, rank “Fail”, “Limited”, “Open”. Reference WORCS checklist paper’s score paper. Optional: Complete additional optional items WORCS checklist hand, get “Perfect” rating. Go project’s repository Click “Settings” button Scroll bottom page; click “Make public”, follow -screen instructions OSF project page, can select License project. helps clearly communicate terms reusability project. Make sure use License selected project creation Step 3. DOI persistent identifier can used link project page. may already created project page Step 5 preregistered OSF Optionally, can generate additional DOIs specific resources like datasets. Alternatively, can connect ‘Git’ remote repository Zenodo, instead OSF, create DOIs project specific resources. Placing statement Abstract Author note means readers can find project even paper published behind paywall. link can masked blind review. open science statement indicate resources available online repository; data, code, materials, study design details, pre-registration, /comprehensive citations. guidance, see Aalbersberg et al. (2018). Example:spirit open science, online repository available XXX, contains [data/synthetic data file], analysis code, research materials used, details study design, comprehensive citations, tagged release preregistration. ‘RStudio’, file ‘manuscript.Rmd’ open, click “Knit” button top left panel retain essential citations , change front matter ‘manuscript.Rmd’ file: Change knit: worcs::cite_all knit: worcs::cite_essential Check Sherpa Romeo sure intended outlet allows publication preprints; many journals , nowadays - , worth considering outlets. Submit paper, tag commit submitted paper release, Step 4.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"notes-for-cautious-researchers","dir":"Articles","previous_headings":"WORCS: Steps to follow for a project","what":"Notes for cautious researchers","title":"The WORCS workflow, version 0.1.6","text":"researchers might want share work paper accepted publication. case, recommend creating “Private” repository Step 1, completing Steps 13-18 upon acceptance journal. Image attribution Git Logo Jason Long licensed Creative Commons Attribution 3.0 Unported License. OSF logo licensed CC0 1.0 Universal. Icons workflow graph obtained Flaticon; see detailed attribution.","code":""},{"path":"https://cjvanlissa.github.io/worcs/articles/workflow.html","id":"sample-worcs-projects","dir":"Articles","previous_headings":"","what":"Sample WORCS projects","title":"The WORCS workflow, version 0.1.6","text":"list sample worcs projects created authors users, see README.md file WORCS GitHub page. list regularly updated. References","code":""},{"path":"https://cjvanlissa.github.io/worcs/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Caspar J. Van Lissa. Author, maintainer. Aaron Peikert. Author. Andreas M. Brandmaier. Author.","code":""},{"path":"https://cjvanlissa.github.io/worcs/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Van Lissa CJ, Peikert , Brandmaier (2024). worcs: Workflow Open Reproducible Code Science. R package version 0.1.15, https://github.com/cjvanlissa/worcs.","code":"@Manual{, title = {worcs: Workflow for Open Reproducible Code in Science}, author = {Caspar J. {Van Lissa} and Aaron Peikert and Andreas M. Brandmaier}, year = {2024}, note = {R package version 0.1.15}, url = {https://github.com/cjvanlissa/worcs}, }"},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"worcs-","dir":"","previous_headings":"","what":"Workflow for Open Reproducible Code in Science","title":"Workflow for Open Reproducible Code in Science","text":"Workflow Open Reproducible Code Science (WORCS) easy adopt approach ensuring research project meets requirements Open Science start. based “good enough” philosophy, prioritizing user-friendliness exhaustiveness. can used either absence , parallel , existing requirements Open workflows. can also enhanced elaborate solutions specific issues.","code":""},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"where-do-i-start","dir":"","previous_headings":"","what":"Where do I start?","title":"Workflow for Open Reproducible Code in Science","text":"users, recommended starting point read paper, published Data Science, introduces WORCS workflow, explains underlying tools, illustrates worcs package can used create new project follows workflow. workflow illustrated ; workflow vignette describes step detail.","code":""},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"installing-the-package","dir":"","previous_headings":"","what":"Installing the package","title":"Workflow for Open Reproducible Code in Science","text":"installing package, please read vignette, explains set computer worcs (using CRAN version). know ’re wish install development version worcs package GitHub instead, can use:","code":"if(!requireNamespace(\"remotes\")) install.packages(\"remotes\") remotes::install_github(\"cjvanlissa/worcs\", dependencies = TRUE, update = \"never\")"},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"citing-worcs","dir":"","previous_headings":"","what":"Citing WORCS","title":"Workflow for Open Reproducible Code in Science","text":"can cite WORCS using following citation (please use citation either package, paper): Van Lissa, C. J., Brandmaier, . M., Brinkman, L., Lamprecht, ., Peikert, ., , Struiksma, M. E., & Vreede, B. (2021). WORCS: Workflow Open Reproducible Code Science. Data Science. Data Science, vol. 4, . 1, pp. 29-49. DOI: 10.3233/DS-210031.","code":""},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"about-this-repository","dir":"","previous_headings":"","what":"About this repository","title":"Workflow for Open Reproducible Code in Science","text":"repository contains following: R-package called worcs, convenience functions facilitate WORCS workflow. subfolder ./paper, source files paper describing WORCS workflow. repository serves two functions: allow users install worcs package, allow collaborators access source code package paper.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"contributing-and-contact-information","dir":"","previous_headings":"","what":"Contributing and Contact Information","title":"Workflow for Open Reproducible Code in Science","text":"always eager receive user feedback contributions help us improve workflow software. Major contributions warrant coauthorship package. Please contact lead author c.j.vanlissa@tilburguniversity.nl, : File GitHub issue feedback, bug reports feature requests Make pull request contribute code prose participating project, agree abide Contributor Code Conduct v2.0. Contributions package must adhere tidyverse style guide. contributing code, please add tests contribution tests/testthat folder, ensure tests pass GitHub Actions panel.","code":""},{"path":"https://cjvanlissa.github.io/worcs/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Workflow for Open Reproducible Code in Science","text":"worcs logo inspired Open Science Badges Center Open Science (CC--4.0), makes use gear, services, gears, preferences, settings icon, made MD Badsha Meah www.freeicons.io (CC--3.0).","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"gnu-general-public-license","dir":"","previous_headings":"","what":"GNU GENERAL PUBLIC LICENSE","title":"NA","text":"Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. https://fsf.org/ Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"NA","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions.","title":"NA","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code.","title":"NA","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions.","title":"NA","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law.","title":"NA","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies.","title":"NA","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions.","title":"NA","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: work must carry prominent notices stating modified , giving relevant date. work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms.","title":"NA","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms.","title":"NA","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: Disclaiming warranty limiting liability differently terms sections 15 16 License; Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; Limiting use publicity purposes names licensors authors material; Declining grant rights trademark law use trade names, trademarks, service marks; Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination.","title":"NA","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies.","title":"NA","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients.","title":"NA","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents.","title":"NA","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom.","title":"NA","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License.","title":"NA","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License.","title":"NA","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty.","title":"NA","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability.","title":"NA","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16.","title":"NA","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://cjvanlissa.github.io/worcs/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"NA","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands `show w’ `show c’ show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see https://www.gnu.org/licenses/. GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read https://www.gnu.org/licenses/--lgpl.html.","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details."},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":null,"dir":"","previous_headings":"","what":"worcs 0.1.15","title":"worcs 0.1.15","text":"Add integration targets package Stricter enforcement “.Rmd” case filenames avoid Linux errors","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0114","dir":"","previous_headings":"","what":"worcs 0.1.14","title":"worcs 0.1.15","text":"Fix checksum calculated indirectly (e.g., Rmarkdown code chunk) Fix error r-release-linux-x86_64 Fix documentation; replace tags tags Improve handling relative file paths worcs:::save_data()","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0113","dir":"","previous_headings":"","what":"worcs 0.1.13","title":"worcs 0.1.15","text":"Address Prof. Brian Ripley’s comment: “Packages Suggests used conditionally: see ‘Writing R Extensions’. needs corrected even missing package(s) become available. can tested checking _R_CHECK_DEPENDS_ONLY_=true.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0112","dir":"","previous_headings":"","what":"worcs 0.1.12","title":"worcs 0.1.15","text":"Add functions add_recipe() reproduce() check_worcs_installation() longer throws error rticles prereg Add defensive programming save_data() load_data() prevent errors. improvement checksums computed; instead checking Git treats line endings (breaks project longer version controlled, e.g., downloading ZIP GitHub), check files binary. Add github action reproduce repo via github actions: github_action_reproduce() Update vignette(\"Reproduce\"); advice download ZIP GitHub bad practice, ZIP longer version controlled Git.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0111","dir":"","previous_headings":"","what":"worcs 0.1.11","title":"worcs 0.1.15","text":"Checksums computed differently preceding versions, account fact Git changes end line characters breaks consistency checksums across operating systems. Add endpoint functionality: add_endpoint(), snapshot_endpoints(), check_endpoints() Add github action endpoints: github_action_check_endpoints() Improve handling relative filenames save_data() fix bug related file path codebook metadata add function report()","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-0110","dir":"","previous_headings":"","what":"worcs 0.1.10","title":"worcs 0.1.15","text":"Fix breaking bug check_worcs_installation() introduced version 0.1.9 Update setup vignette reflect new GitHub authentication protocols","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-019","dir":"","previous_headings":"","what":"worcs 0.1.9","title":"worcs 0.1.15","text":"closed_data() open_data() now store factor ordered value labels YAML file Added functions data_unlabel() data_label(), respectively coerce factors integer, restore integers factors using metadata stored YAML file load_data() attempts coerce variable classes using codebook, restores ordered levels value_labels YAML file Update templates rticles prereg packages Add check_worcs_installation() function determine whether non-R-package dependencies installed correctly Update references WORCS paper Replace GitHub version papaja CRAN version Fix URLs Update rticles prereg templates Handle literal function names rticles prereg, users can use available options packages without worcs explicitly referencing functions Add arguments ‘save_expression’ ‘load_expression’ closed_data() open_data(). allows users save data different formats. ‘load_expression’ stored .worcs file, referenced load_data().","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-018","dir":"","previous_headings":"","what":"worcs 0.1.8","title":"worcs 0.1.15","text":"Declared pandoc SystemRequirements Made examples using pandoc conditional availability pandoc Functions wrap rmarkdown::render() now return NULL pandoc available","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-017","dir":"","previous_headings":"","what":"worcs 0.1.7","title":"worcs 0.1.15","text":"Fixed failing tests requested dr. Brian Ripley","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-016","dir":"","previous_headings":"","what":"worcs 0.1.6","title":"worcs 0.1.15","text":"Workflow vignette updated address reviewer comments “Data Science” New functions: add_synthetic() notify_synthetic() closed_data() longer wraps errors call synthetic(). Thus, function call fails error data synthesis fails. closed_data() now passes formal arguments synthetic() contained ‘…’ synthetic(). synthetic() now allows ‘y’ referenced ‘predict_expression’ ‘model_expression’ set NULL, thereby enabling bootstrapping. internal function worcs:::col_message() now renders status messages black print instead colored print rmarkdown::render() callstack. avoids errors knitting PDF. See https://github.com/rstudio/rmarkdown/issues/1951 error circumvented fix.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-015","dir":"","previous_headings":"","what":"worcs 0.1.5","title":"worcs 0.1.15","text":"Necessary update due breaking changes dependency gert package Add function add_preregistration() add preregistration later stage Add preregistration templates “PSS” “Secondary”","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-014","dir":"","previous_headings":"","what":"worcs 0.1.4","title":"worcs 0.1.15","text":"Fixed bugs handling filenames open_data() closed_data() codebook.Rmd name object supplied ‘data’ argument default, open_data() closed_data() now construct filenames .csv codebook.Rmd name object supplied ‘data’ argument. also means object loaded name load_data(). Add function add_manuscript() add manuscript later stage Major bugfixes worcs_badge(); function work intended. Fixed now","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-013","dir":"","previous_headings":"","what":"worcs 0.1.3","title":"worcs 0.1.15","text":"Minor bugfixes descriptives() now returns mean() instead sd() descriptives() now returns n missing README.md now correctly shows .Rproj file rticles now declared import","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-012","dir":"","previous_headings":"","what":"worcs 0.1.2","title":"worcs 0.1.15","text":"documentation updated ensure compatibility submitted version WORCS-paper. Authors references WORCS-paper updated include co-authors. Prevent git_user() engaging antisocial behavior, resetting users’ ‘Git’ credentials, adding default argument ‘overwrite = !has_git_user()’. default, function nothing ‘Git’ user credentials already exist. Bug fix load_data() ensure compatibility ‘RMarkdown’ behavior running code chunks .Rmd file directory, instead actual working directory. Bug fix cite_all() cite_essential() allow escaping literal double @. Bug fix export_project(), now respects folder structure within project, also supports relative paths ensure portability, even called different working working directory. Fixing bug required changing working directory calling zip(). change working directory immediately followed call .exit(setwd(oldwd)), line CRAN policy. .worcs file used determine existence worcs-project recursively. .worcs file now tracks entry point analyses.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news.html","id":"worcs-011","dir":"","previous_headings":"","what":"worcs 0.1.1","title":"worcs 0.1.15","text":"First CRAN release.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Add endpoint to WORCS project — add_endpoint","title":"Add endpoint to WORCS project — add_endpoint","text":"Add specific endpoint WORCS project file. Endpoints files expected exactly reproducible (e.g., manuscript, figure, table, et cetera). Reproducibility checked ensuring endpoint's checksum unchanged.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add endpoint to WORCS project — add_endpoint","text":"","code":"add_endpoint(filename = NULL, worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add endpoint to WORCS project — add_endpoint","text":"filename Character, indicating file tracked endpoint. Default: NULL. worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add endpoint to WORCS project — add_endpoint","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/add_endpoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add endpoint to WORCS project — add_endpoint","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"add_endpoint\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE writeLines(\"test\", \"test.txt\") add_endpoint(\"test.txt\") #> ✔ Adding endpoint 'test.txt' to '.worcs'. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Rmarkdown manuscript — add_manuscript","title":"Add Rmarkdown manuscript — add_manuscript","text":"Adds Rmarkdown manuscript 'worcs' project.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Rmarkdown manuscript — add_manuscript","text":"","code":"add_manuscript( worcs_directory = \".\", manuscript = \"APA6\", remote_repo = NULL, verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Rmarkdown manuscript — add_manuscript","text":"worcs_directory Character, indicating directory create manuscript files. Default: '.', points current working directory. manuscript Character, indicating template use 'R Markdown' manuscript. Default: 'APA6'. Available choices include: \"APA6\", \"github_document\", \"None\" templates rticles package. See Details. remote_repo Character, 'https' link remote repository project. link form https://[...].git. link inserted draft manuscript. verbose Logical. Whether print messages console project creation. Default: TRUE ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Rmarkdown manuscript — add_manuscript","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Rmarkdown manuscript — add_manuscript","text":"Available choices include following manuscript templates: 'APA6' APA6 style template papaja package 'github_document' github_document rmarkdown package 'acm_article' acm style template rtices package 'acs_article' acs style template rtices package 'aea_article' aea style template rtices package 'agu_article' agu style template rtices package 'ajs_article' ajs style template rtices package 'amq_article' amq style template rtices package 'ams_article' ams style template rtices package 'arxiv_article' arxiv style template rtices package 'asa_article' asa style template rtices package 'bioinformatics_article' bioinformatics style template rtices package 'biometrics_article' biometrics style template rtices package 'copernicus_article' copernicus style template rtices package 'ctex_article' ctex style template rtices package 'elsevier_article' elsevier style template rtices package 'frontiers_article' frontiers style template rtices package 'glossa_article' glossa style template rtices package 'ieee_article' ieee style template rtices package 'ims_article' ims style template rtices package 'informs_article' informs style template rtices package 'iop_article' iop style template rtices package 'isba_article' isba style template rtices package 'jasa_article' jasa style template rtices package 'jedm_article' jedm style template rtices package 'joss_article' joss style template rtices package 'jss_article' jss style template rtices package 'lipics_article' lipics style template rtices package 'mdpi_article' mdpi style template rtices package 'mnras_article' mnras style template rtices package 'oup_article' oup style template rtices package 'peerj_article' peerj style template rtices package 'pihph_article' pihph style template rtices package 'plos_article' plos style template rtices package 'pnas_article' pnas style template rtices package 'rjournal_article' rjournal style template rtices package 'rsos_article' rsos style template rtices package 'rss_article' rss style template rtices package 'sage_article' sage style template rtices package 'sim_article' sim style template rtices package 'springer_article' springer style template rtices package 'tf_article' tf style template rtices package 'trb_article' trb style template rtices package 'wellcomeor_article' wellcomeor style template rtices package","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_manuscript.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Rmarkdown manuscript — add_manuscript","text":"","code":"the_test <- \"worcs_manuscript\" old_wd <- getwd() dir.create(file.path(tempdir(), the_test)) file.create(file.path(tempdir(), the_test, \".worcs\")) #> [1] TRUE add_manuscript(file.path(tempdir(), the_test), manuscript = \"None\") #> ✔ Creating manuscript files. setwd(old_wd) unlink(file.path(tempdir(), the_test))"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Rmarkdown preregistration — add_preregistration","title":"Add Rmarkdown preregistration — add_preregistration","text":"Adds Rmarkdown preregistration template 'worcs' project.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Rmarkdown preregistration — add_preregistration","text":"","code":"add_preregistration( worcs_directory = \".\", preregistration = \"cos_prereg\", verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Rmarkdown preregistration — add_preregistration","text":"worcs_directory Character, indicating directory create manuscript files. Default: '.', points current working directory. preregistration Character, indicating template use preregistration. Default: \"cos_prereg\"; use \"None\" omit preregistration. See Details available choices. verbose Logical. Whether print messages console project creation. Default: TRUE ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Rmarkdown preregistration — add_preregistration","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Rmarkdown preregistration — add_preregistration","text":"Available choices include templates prereg package, several unique templates included worcs: 'PSS' Preregistration Sharing Software (Krypotos, Klugkist, Mertens, & Engelhard, 2019) 'Secondary' Preregistration secondary analyses (Mertens & Krypotos, 2019) 'aspredicted_prereg' aspredicted template prereg package 'brandt_prereg' brandt template prereg package 'cos_prereg' cos template prereg package 'fmri_prereg' fmri template prereg package 'prp_quant_prereg' prp_quant template prereg package 'psyquant_prereg' psyquant template prereg package 'rr_prereg' rr template prereg package 'vantveer_prereg' vantveer template prereg package","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_preregistration.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Rmarkdown preregistration — add_preregistration","text":"","code":"the_test <- \"worcs_prereg\" old_wd <- getwd() dir.create(file.path(tempdir(), the_test)) file.create(file.path(tempdir(), the_test, \".worcs\")) #> [1] TRUE add_preregistration(file.path(tempdir(), the_test), preregistration = \"cos_prereg\") #> ✔ Creating preregistration files. setwd(old_wd) unlink(file.path(tempdir(), the_test))"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Recipe to Generate Endpoints — add_recipe","title":"Add Recipe to Generate Endpoints — add_recipe","text":"Add recipe WORCS project file generate endpoints.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Recipe to Generate Endpoints — add_recipe","text":"","code":"add_recipe( worcs_directory = \".\", recipe = \"rmarkdown::render('manuscript/manuscript.Rmd')\", terminal = FALSE, verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Recipe to Generate Endpoints — add_recipe","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' recipe Character string, indicating function call evaluate order reproduce endpoints WORCS project. terminal Logical, indicating whether evaluate recipe terminal (TRUE) R (FALSE). Defaults FALSE verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Recipe to Generate Endpoints — add_recipe","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/add_recipe.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Recipe to Generate Endpoints — add_recipe","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"add_recipe\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE writeLines(\"test\", \"test.txt\") add_recipe() #> ✔ Adding recipe to '.worcs'. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":null,"dir":"Reference","previous_headings":"","what":"Add synthetic data to WORCS project — add_synthetic","title":"Add synthetic data to WORCS project — add_synthetic","text":"function adds user-specified synthetic data resource public use WORCS project closed data.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add synthetic data to WORCS project — add_synthetic","text":"","code":"add_synthetic( data, synthetic_name = paste0(\"synthetic_\", original_name), original_name, worcs_directory = \".\", verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add synthetic data to WORCS project — add_synthetic","text":"data data.frame containing synthetic data. synthetic_name Character, naming file synthetic data written . default, prepends \"synthetic_\" original_name. original_name Character, naming existing data resource WORCS project associate synthetic data object. worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add synthetic data to WORCS project — add_synthetic","text":"Returns NULL invisibly. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/add_synthetic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add synthetic data to WORCS project — add_synthetic","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"add_synthetic\") dir.create(test_dir) setwd(test_dir) worcs:::write_worcsfile(\".worcs\") # Prepare data df <- iris[1:3, ] # Run closed_data without synthetic closed_data(df, codebook = NULL, synthetic = FALSE) #> ✔ Storing original data in 'df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. #> ✔ Storing value labels in 'value_labels_df.yml'. # Manually add synthetic add_synthetic(df, original_name = \"df.csv\") #> ✔ Storing synthetic data in 'synthetic_df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. # Remove original from file and environment file.remove(\"df.csv\") #> [1] TRUE rm(df) # See that load_data() now loads the synthetic file load_data() #> ✔ Loading synthetic data from 'synthetic_df.csv'. #> ✖ No valid codebook found. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":null,"dir":"Reference","previous_headings":"","what":"Add targets to WORCS Project — add_targets","title":"Add targets to WORCS Project — add_targets","text":"Add computational pipeline worcs project using targets tarchetypes packages (must installed). See packages extensive documentation.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add targets to WORCS Project — add_targets","text":"","code":"add_targets(worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add targets to WORCS Project — add_targets","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE ... Arguments passed targets::use_targets().","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add targets to WORCS Project — add_targets","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/add_targets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add targets to WORCS Project — add_targets","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"targets\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE add_targets() #> ▶ Wrote _targets.R #> ✔ Added targets to project. #> ✔ Setting recipe to targets::tar_make(). #> ✔ Creating directory './R/' for targets scripts. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Check endpoints in WORCS project — check_endpoints","title":"Check endpoints in WORCS project — check_endpoints","text":"Check checksums endpoints WORCS project match snapshots.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check endpoints in WORCS project — check_endpoints","text":"","code":"check_endpoints(worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check endpoints in WORCS project — check_endpoints","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check endpoints in WORCS project — check_endpoints","text":"Returns logical value (TRUE/FALSE) invisibly.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/check_endpoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check endpoints in WORCS project — check_endpoints","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"check_endpoint\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE writeLines(\"test\", \"test.txt\") add_endpoint(\"test.txt\") #> ✔ Adding endpoint 'test.txt' to '.worcs'. check_endpoints() #> ✔ Endpoint 'test.txt' replicates. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate project with respect to WORCS checklist — check_worcs","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"Evaluates whether project meets criteria WORCS checklist (see worcs_checklist).","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"","code":"check_worcs(path = \".\", verbose = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"path Character. Path WORCS project folder (project .worcs file). Default: '.' (path current directory). verbose Logical. Whether show status messages evaluating checklist. Default: TRUE.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"data.frame description criteria, column evaluations ($pass). criteria must evaluated manually, $pass FALSE.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate project with respect to WORCS checklist — check_worcs","text":"","code":"example_dir <- file.path(tempdir(), \"badge\") dir.create(example_dir) write(\"a\", file.path(example_dir, \".worcs\")) check_worcs(path = example_dir) #> ✖ Does the project have a README.md file? #> ✖ Does the project have a LICENSE file? #> ✖ Does the project cite any references in 'manuscript.Rmd' or 'preregistration.Rmd'? #> ✖ Does the project have a public* 'data.csv' or 'synthetic_data.csv' file? (*public: version controlled in 'Git') #> ✖ Are the data checksums up to date? #> ✖ Does the project contain any '.R' code files? #> ✖ Does the project have a preregistration? #> ✖ Does the project have a 'Git' repository? #> ✖ Is the 'Git' repository connected to a remote repository (e.g., 'GitHub')? #> category name #> 1 documentation readme #> 2 documentation license #> 3 citation citation #> 4 citation comprehensive #> 5 data data #> 6 data data_checksums #> 7 code code #> 8 code code_reproducible #> 9 materials materials #> 10 design design #> 11 analysis analysis #> 12 preregistration preregistration #> 13 preregistration prereg_analysis #> 14 git git_repo #> 15 git has_remote #> description #> 1 Does the project have a README.md file? #> 2 Does the project have a LICENSE file? #> 3 Does the project cite any references in 'manuscript.Rmd' or 'preregistration.Rmd'? #> 4 Does the project cite all literature, data sources, materials, and methods (including R-packages) used? #> 5 Does the project have a public* 'data.csv' or 'synthetic_data.csv' file? (*public: version controlled in 'Git') #> 6 Are the data checksums up to date? #> 7 Does the project contain any '.R' code files? #> 8 Can the entire project be reproduced by running a single file (e.g.,'manuscript.Rmd', 'run_me.R', or a Makefile)? #> 9 Any new materials are shared openly; existing materials are referenced. #> 10 Details of the study design are documented. #> 11 Details of the analysis are documented. #> 12 Does the project have a preregistration? #> 13 Does the preregistration contain detailed analysis plans or preliminary code? #> 14 Does the project have a 'Git' repository? #> 15 Is the 'Git' repository connected to a remote repository (e.g., 'GitHub')? #> importance check pass #> 1 essential TRUE FALSE #> 2 essential TRUE FALSE #> 3 optional TRUE FALSE #> 4 optional FALSE FALSE #> 5 essential TRUE FALSE #> 6 essential TRUE FALSE #> 7 essential TRUE FALSE #> 8 optional FALSE FALSE #> 9 optional FALSE FALSE #> 10 essential FALSE FALSE #> 11 essential FALSE FALSE #> 12 optional TRUE FALSE #> 13 optional FALSE FALSE #> 14 essential TRUE FALSE #> 15 essential TRUE FALSE"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":null,"dir":"Reference","previous_headings":"","what":"Check worcs dependencies — check_worcs_installation","title":"Check worcs dependencies — check_worcs_installation","text":"function checks worcs dependencies correctly installed, suggests remedy missing dependencies.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check worcs dependencies — check_worcs_installation","text":"","code":"check_worcs_installation(what = \"all\") check_dependencies(package = \"worcs\") check_git() check_github(pat = TRUE, ssh = FALSE) check_ssh() check_tinytext() check_rmarkdown() check_renv()"},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check worcs dependencies — check_worcs_installation","text":"Character vector indicating dependencies check. Default: \"\". checks defined Usage section can called, e.g. check_git can called using argument = \"git\". package Atomic character vector, indicating package check dependencies. pat Logical, whether run tests existence functioning GitHub Personal Access Token (PAT). preferred method authentication, defaults TRUE. ssh Logical, whether run tests existence functioning SSH key. method authentication recommended, defaults FALSE.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check worcs dependencies — check_worcs_installation","text":"Logical, indicating whether checks passed .","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/check_worcs_installation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check worcs dependencies — check_worcs_installation","text":"","code":"check_worcs_installation(\"none\")"},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Comprehensive citation Knit function for 'RStudio' — cite_all","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"wrapper render. First, function parses citations document, converting citations marked double sign, e.g.: @@reference2020, normal citations, e.g.: @reference2020. , renders file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"","code":"cite_all(...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"... arguments passed render.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"Returns NULL invisibly. function called side effect rendering 'R Markdown' file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_all.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comprehensive citation Knit function for 'RStudio' — cite_all","text":"","code":"# NOTE: Do not use this function interactively, as in the example below. # Only specify it as custom knit function in an 'R Markdown' file, like so: # knit: worcs::cite_all if (rmarkdown::pandoc_available(\"2.0\")){ file_name <- file.path(tempdir(), \"citeall.Rmd\") loc <- rmarkdown::draft(file_name, template = \"github_document\", package = \"rmarkdown\", create_dir = FALSE, edit = FALSE) write(c(\"\", \"Optional reference: @reference2020\"), file = file_name, append = TRUE) cite_all(file_name) } #> #> #> processing file: citeall.Rmd #> 1/7 #> 2/7 [setup] #> 3/7 #> 4/7 [cars] #> 5/7 #> 6/7 [pressure] #> 7/7 #> output file: citeall.knit.md #> \"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc\" +RTS -K512m -RTS citeall.knit.md --to gfm+tex_math_dollars-yaml_metadata_block --from markdown+autolink_bare_uris+tex_math_single_backslash --output citeall.md --template \"C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\default.md\" #> \"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc\" +RTS -K512m -RTS citeall.md --to html4 --from gfm+tex_math_dollars --output citeall.html --embed-resources --standalone --highlight-style pygments --template \"C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\preview.html\" --variable \"github-markdown-css:C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\github.css\" --metadata pagetitle=PREVIEW --mathjax #> #> Preview created: citeall.html #> #> Output created: citeall.md"},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":null,"dir":"Reference","previous_headings":"","what":"Essential citations Knit function for 'RStudio' — cite_essential","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"wrapper render. First, function parses citations document, removing citations marked double sign, e.g.: @@reference2020. , renders file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"","code":"cite_essential(...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"... arguments passed render.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"Returns NULL invisibly. function called side effect rendering 'R Markdown' file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/cite_essential.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Essential citations Knit function for 'RStudio' — cite_essential","text":"","code":"# NOTE: Do not use this function interactively, as in the example below. # Only specify it as custom knit function in an R Markdown file, like so: # knit: worcs::cite_all if (rmarkdown::pandoc_available(\"2.0\")){ file_name <- tempfile(\"citeessential\", fileext = \".Rmd\") rmarkdown::draft(file_name, template = \"github_document\", package = \"rmarkdown\", create_dir = FALSE, edit = FALSE) write(c(\"\", \"Optional reference: @reference2020\"), file = file_name, append = TRUE) cite_essential(file_name) } #> #> #> processing file: citeessential3f3c532d15f7.Rmd #> 1/7 #> 2/7 [setup] #> 3/7 #> 4/7 [cars] #> 5/7 #> 6/7 [pressure] #> 7/7 #> output file: citeessential3f3c532d15f7.knit.md #> \"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc\" +RTS -K512m -RTS citeessential3f3c532d15f7.knit.md --to gfm+tex_math_dollars-yaml_metadata_block --from markdown+autolink_bare_uris+tex_math_single_backslash --output citeessential3f3c532d15f7.md --template \"C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\default.md\" #> \"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc\" +RTS -K512m -RTS citeessential3f3c532d15f7.md --to html4 --from gfm+tex_math_dollars --output citeessential3f3c532d15f7.html --embed-resources --standalone --highlight-style pygments --template \"C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\preview.html\" --variable \"github-markdown-css:C:\\Users\\vanlissa\\AppData\\Local\\Programs\\R\\R-4.4.0\\library\\rmarkdown\\rmarkdown\\templates\\github_document\\resources\\github.css\" --metadata pagetitle=PREVIEW --mathjax #> #> Preview created: citeessential3f3c532d15f7.html #> #> Output created: citeessential3f3c532d15f7.md"},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Use closed data in WORCS project — closed_data","title":"Use closed data in WORCS project — closed_data","text":"function saves data.frame .csv file (using write.csv), stores checksum '.worcs', appends .gitignore file exclude filename, saves synthetic copy data public use. generate synthetic data, function synthetic used.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use closed data in WORCS project — closed_data","text":"","code":"closed_data( data, filename = paste0(deparse(substitute(data)), \".csv\"), codebook = paste0(\"codebook_\", deparse(substitute(data)), \".Rmd\"), value_labels = paste0(\"value_labels_\", deparse(substitute(data)), \".yml\"), worcs_directory = \".\", synthetic = TRUE, save_expression = write.csv(x = data, file = filename, row.names = FALSE), load_expression = read.csv(file = filename, stringsAsFactors = TRUE), ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use closed data in WORCS project — closed_data","text":"data data.frame save. filename Character, naming file data written . default, constructs filename name object passed data. codebook Character, naming file codebook written . 'R Markdown' codebook created rendered github_document ('markdown' 'GitHub'). default, constructs filename name object passed data, adding word 'codebook'. Set argument NULL avoid creating codebook. value_labels Character, naming file value labels factors ordinal variables written . default, constructs filename name object passed data, adding word 'value_labels'. Set argument NULL avoid creating file value labels. worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. synthetic Logical, indicating whether create synthetic dataset using synthetic function. Additional arguments call synthetic can passed .... save_expression R-expression used save data. Defaults write.csv(x = data, file = filename, row.names = FALSE), writes comma-separated, spreadsheet-style file. arguments data filename passed open_data() expression defined save_expression. load_expression R-expression used load data file created save_expression. Defaults read.csv(file = filename, stringsAsFactors = TRUE). expression stored project's .worcs file, invoked load_data(). ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use closed data in WORCS project — closed_data","text":"Returns NULL invisibly. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/closed_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use closed data in WORCS project — closed_data","text":"","code":"old_wd <- getwd() test_dir <- file.path(tempdir(), \"data\") dir.create(test_dir) setwd(test_dir) worcs:::write_worcsfile(\".worcs\") df <- iris[1:3, ] closed_data(df, codebook = NULL) #> ✔ Storing original data in 'df.csv' and updating the checksum in '.worcs'. #> ✔ Generating synthetic data for public use. Ensure that no identifying information is included. #> | | | 0% | |============== | 20% | |============================ | 40% | |========================================== | 60% | |======================================================== | 80% #> Warning: Dropped unused factor level(s) in dependent variable: versicolor, virginica. #> | |======================================================================| 100% #> ✔ Storing synthetic data in 'synthetic_df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. #> ✔ Updating '.gitignore'. #> ✔ Storing value labels in 'value_labels_df.yml'. setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":null,"dir":"Reference","previous_headings":"","what":"Create codebook for a dataset — make_codebook","title":"Create codebook for a dataset — make_codebook","text":"Creates codebook dataset 'R Markdown' format, renders 'markdown' 'GitHub'. codebook contains metadata documentation data file. urge users customize automatically generated 'R Markdown' document re-knit , example, add paragraph details data collection procedures. variable descriptives stored .csv file, can edited 'R' spreadsheet program. Columns can appended, encourage users complete least following two columns file: category Describe type variable column. example: \"morality\". description Provide plain-text description variable. example, full text questionnaire item: \"People willing anything help member family\". Re-knitting 'R Markdown' file (using render) transfer changes 'markdown' file 'GitHub'.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create codebook for a dataset — make_codebook","text":"","code":"make_codebook( data, filename = \"codebook.Rmd\", render_file = TRUE, csv_file = gsub(\"rmd$\", \"csv\", filename, ignore.case = TRUE), verbose = TRUE )"},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create codebook for a dataset — make_codebook","text":"data data.frame create codebook. filename Character. File name write codebook rmarkdown file . render_file Logical. Whether render document. csv_file Character. File name write codebook rmarkdown file . default, uses filename stem filename argument. Set NULL write codebook 'R Markdown' file, .csv. verbose Logical. Whether print status messages console. Default: TRUE","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create codebook for a dataset — make_codebook","text":"Logical, indicating whether operation successful. function mostly called side effect rendering 'R Markdown' codebook.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/codebook.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create codebook for a dataset — make_codebook","text":"","code":"if(rmarkdown::pandoc_available(\"2.0\")){ library(rmarkdown) library(knitr) filename <- tempfile(\"codebook\", fileext = \".Rmd\") make_codebook(iris, filename = filename, csv_file = NULL) unlink(c( \".worcs\", filename, gsub(\"\\\\.Rmd\", \"\\\\.md\", filename), gsub(\"\\\\.Rmd\", \"\\\\.html\", filename), gsub(\"\\\\.Rmd\", \"_files\", filename) ), recursive = TRUE) }"},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":null,"dir":"Reference","previous_headings":"","what":"Label factor variables using metadata — data_label","title":"Label factor variables using metadata — data_label","text":"column x, function checks whether value labels exist value_labels. , integer values replaced value labels.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Label factor variables using metadata — data_label","text":"","code":"data_label( x, variables = names(x), value_labels = read_yaml(paste0(\"value_labels_\", substitute(x), \".yml\")) )"},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Label factor variables using metadata — data_label","text":"x data.frame. variables Column names x replace, Default: names(x) value_labels list value labels, typically read metadata generated open_data closed_data. Default: read_yaml(paste0(\"value_labels_\", substitute(x), \".yml\"))","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Label factor variables using metadata — data_label","text":"data.frame.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_label.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Label factor variables using metadata — data_label","text":"","code":"if (FALSE) { if(interactive()){ labs <- list(x = list(class = \"factor\", `1` = \"a\", `2` = \"b\")) df <- data.frame(x = 1:2) data_label(df, value_labels = labs) } }"},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Drop value labels — data_unlabel","title":"Drop value labels — data_unlabel","text":"Coerces factor ordered variables class integer.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drop value labels — data_unlabel","text":"","code":"data_unlabel(x, variables = names(x)[sapply(x, inherits, what = \"factor\")])"},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drop value labels — data_unlabel","text":"x data.frame. variables Column names x coerce integer.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Drop value labels — data_unlabel","text":"data.frame.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/data_unlabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Drop value labels — data_unlabel","text":"","code":"if (FALSE) { if(interactive()){ df <- data.frame(x = factor(c(\"a\", \"b\"))) data_unlabel(df) } }"},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":null,"dir":"Reference","previous_headings":"","what":"Describe a dataset — descriptives","title":"Describe a dataset — descriptives","text":"Provide descriptive statistics dataset.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Describe a dataset — descriptives","text":"","code":"descriptives(x, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Describe a dataset — descriptives","text":"x object method exists. ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Describe a dataset — descriptives","text":"data.frame descriptive statistics x.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/descriptives.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Describe a dataset — descriptives","text":"","code":"descriptives(iris) #> name type n missing unique mean median mode mode_value #> 1 Sepal.Length numeric 150 0 35 5.843333 5.80 5.80 #> 2 Sepal.Width numeric 150 0 23 3.057333 3.00 3.00 #> 3 Petal.Length numeric 150 0 43 3.758000 4.35 4.35 #> 4 Petal.Width numeric 150 0 22 1.199333 1.30 1.30 #> 5 Species factor 150 0 4 NA NA 50.00 setosa #> sd v min max range skew skew_2se kurt kurt_2se #> 1 0.8280661 NA 4.3 7.9 3.6 0.3086407 0.7792448 -0.6058125 -0.7696120 #> 2 0.4358663 NA 2.0 4.4 2.4 0.3126147 0.7892781 0.1387047 0.1762076 #> 3 1.7652982 NA 1.0 6.9 5.9 -0.2694109 -0.6801988 -1.4168574 -1.7999470 #> 4 0.7622377 NA 0.1 2.5 2.4 -0.1009166 -0.2547904 -1.3581792 -1.7254034 #> 5 NA 0.6666667 NA NA NA NA NA NA NA"},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Export project to .zip file — export_project","title":"Export project to .zip file — export_project","text":"Export project .zip file","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export project to .zip file — export_project","text":"","code":"export_project(zipfile = NULL, worcs_directory = \".\", open_data = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export project to .zip file — export_project","text":"zipfile Character. Path .zip file created. default argument NULL creates .zip file directory one level 'worcs' project directory. default, files tracked 'Git' included .zip file, excluding 'data.csv' open_data = FALSE. worcs_directory Character. Path WORCS project directory export. Defaults \".\", refers current working directory. open_data Logical. Whether include original data, 'data.csv', file exists. open_data = FALSE open data file exist, excluded .zip file. yet exist, synthetic data set generated added .zip file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export project to .zip file — export_project","text":"Logical, indicating success operation. function called side effect creating .zip file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/export_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export project to .zip file — export_project","text":"","code":"export_project(worcs_directory = tempdir()) #> Warning: cannot open file 'C:\\Users\\vanlissa\\AppData\\Local\\Temp\\RtmpcP5twp/.worcs': No such file or directory #> ✖ No '.worcs' file found; not a WORCS project, or the working directory has been changed."},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_check_endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Set up GitHub Actions to Check Endpoints — github_action_check_endpoints","title":"Set up GitHub Actions to Check Endpoints — github_action_check_endpoints","text":"Sets GitHub Action perform continuous integration (CI) WORCS project. CI automatically evaluates check_endpoints() push pull request.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_check_endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set up GitHub Actions to Check Endpoints — github_action_check_endpoints","text":"","code":"github_action_check_endpoints()"},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_check_endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set up GitHub Actions to Check Endpoints — github_action_check_endpoints","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_reproduce.html","id":null,"dir":"Reference","previous_headings":"","what":"Set up GitHub Action to Reproduce WORCS Project — github_action_reproduce","title":"Set up GitHub Action to Reproduce WORCS Project — github_action_reproduce","text":"Sets GitHub Action perform continuous integration (CI) WORCS project. CI automatically evaluates reproduce() check_endpoints() push pull request.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_reproduce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set up GitHub Action to Reproduce WORCS Project — github_action_reproduce","text":"","code":"github_action_reproduce()"},{"path":"https://cjvanlissa.github.io/worcs/reference/github_action_reproduce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set up GitHub Action to Reproduce WORCS Project — github_action_reproduce","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":null,"dir":"Reference","previous_headings":"","what":"Modify .gitignore file — git_ignore","title":"Modify .gitignore file — git_ignore","text":"Arguments passed ... added .gitignore file. Elements already present file modified. ignore = TRUE, arguments added .gitignore file, cause 'Git' track . ignore = FALSE, arguments prepended !, works \"double negation\", cause 'Git' track files.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modify .gitignore file — git_ignore","text":"","code":"git_ignore(..., ignore = TRUE, repo = \".\")"},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modify .gitignore file — git_ignore","text":"... number character arguments, representing files added .gitignore file. ignore Logical. Whether 'Git' ignore files. repo path existing repository, git_repository object returned git_open, git_init git_clone.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modify .gitignore file — git_ignore","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_ignore.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modify .gitignore file — git_ignore","text":"","code":"dir.create(\".git\") git_ignore(\"ignorethis.file\") unlink(\".git\", recursive = TRUE) file.remove(\".gitignore\") #> [1] TRUE"},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":null,"dir":"Reference","previous_headings":"","what":"Add, commit, and push changes. — git_update","title":"Add, commit, and push changes. — git_update","text":"function wrapper git_add, git_commit, git_push. adds locally changed files staging area local 'Git' repository, commits changes (optional) message, pushes remote repository. used making \"cloud backup\" local changes. use function working privacy sensitive data, file pushed remote repository. git_add argument force disabled default, avoid accidentally committing pushing file listed .gitignore.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add, commit, and push changes. — git_update","text":"","code":"git_update( message = paste0(\"update \", Sys.time()), files = \".\", repo = \".\", author, committer, remote, refspec, password, ssh_key, mirror, force, verbose = TRUE )"},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add, commit, and push changes. — git_update","text":"message commit message files vector paths relative git root directory. Use \".\" stage changed files. repo path existing repository, git_repository object returned git_open, git_init git_clone. author git_signature value, default git_signature_default. committer git_signature value, default author remote name remote listed git_remote_list() refspec string mapping remote local refs password string callback function get passwords authentication password protected ssh keys. Defaults askpass checks getOption('askpass'). ssh_key path object containing ssh private key. default look keys ssh-agent credentials::ssh_key_info. mirror use --mirror flag force use --force flag verbose display progress info downloading","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add, commit, and push changes. — git_update","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_update.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add, commit, and push changes. — git_update","text":"","code":"git_update() #> ✔ Identified local 'Git' repository. #> ✔ Added files to staging area of 'Git' repository. #> ✔ Committed staged files to 'Git' repository. #> ✔ Pushed local commits to remote repository."},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":null,"dir":"Reference","previous_headings":"","what":"Set global 'Git' credentials — git_user","title":"Set global 'Git' credentials — git_user","text":"function wrapper git_config_global_set. sets two name/value pairs : name = \"user.name\" set value name argument, name = \"user.email\" set value email argument.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set global 'Git' credentials — git_user","text":"","code":"git_user(name, email, overwrite = !has_git_user(), verbose = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set global 'Git' credentials — git_user","text":"name Character. user name want use 'Git'. email Character. email address want use 'Git'. overwrite Logical. Whether overwrite existing 'Git' credentials. Use prevent code accidentally overwriting existing 'Git' credentials. default value uses has_git_user set overwrite FALSE user credentials already exist, TRUE user credentials exist. verbose Logical. Whether print status messages console. Default: TRUE","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set global 'Git' credentials — git_user","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/git_user.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set global 'Git' credentials — git_user","text":"","code":"do.call(git_user, worcs:::get_user()) #> To set the 'Git' username and email, call 'git_user()' with the argument 'overwrite = TRUE'."},{"path":"https://cjvanlissa.github.io/worcs/reference/has_git_user.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether global 'Git' credentials exist — has_git_user","title":"Check whether global 'Git' credentials exist — has_git_user","text":"Check whether values user.name user.email exist exist 'Git' global configuration settings. Uses git_config_global.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/has_git_user.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether global 'Git' credentials exist — has_git_user","text":"","code":"has_git_user()"},{"path":"https://cjvanlissa.github.io/worcs/reference/has_git_user.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether global 'Git' credentials exist — has_git_user","text":"Logical, indicating whether 'Git' global configuration settings retrieved, contained values user.name user.email.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/has_git_user.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether global 'Git' credentials exist — has_git_user","text":"","code":"has_git_user() #> [1] TRUE"},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Load WORCS project data — load_data","title":"Load WORCS project data — load_data","text":"Scans WORCS project file data saved using open_data closed_data, loads data global (working) environment. function load original data available current system. synthetic dataset available, function loads synthetic data. name object containing data derived file name removing file extension, , applicable, prefix \"synthetic_\". Thus, \"data.csv\" \"synthetic_data.csv\" loaded object called data.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load WORCS project data — load_data","text":"","code":"load_data( worcs_directory = \".\", to_envir = TRUE, envir = parent.frame(1), verbose = TRUE, use_metadata = TRUE )"},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load WORCS project data — load_data","text":"worcs_directory Character, indicating WORCS project directory load data. default value \".\" points current directory. to_envir Logical, indicating whether load objects directly environment, return list containing objects. environment designated argument envir. Loading objects directly global environment user-friendly, risk overwriting existing object name, explained load. function load_data gives warning happens. envir environment data loaded. default value parent.frame(1) refers global environment interactive session. verbose Logical. Whether print status messages console. Default: TRUE use_metadata Logical. Whether use codebook value labels attempt coerce class values variables recorded therein. Default: TRUE","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load WORCS project data — load_data","text":"Returns list invisibly. to_envir = TRUE, list contains loaded data files. to_envir = FALSE, list empty, loaded data files attached directly global environment.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load WORCS project data — load_data","text":"","code":"test_dir <- file.path(tempdir(), \"loaddata\") old_wd <- getwd() dir.create(test_dir) setwd(test_dir) worcs:::write_worcsfile(\".worcs\") df <- iris[1:5, ] suppressWarnings(closed_data(df, codebook = NULL)) #> ✔ Storing original data in 'df.csv' and updating the checksum in '.worcs'. #> ✔ Generating synthetic data for public use. Ensure that no identifying information is included. #> | | | 0% | |============== | 20% | |============================ | 40% | |========================================== | 60% | |======================================================== | 80% | |======================================================================| 100% #> ✔ Storing synthetic data in 'synthetic_df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. #> ✔ Updating '.gitignore'. #> ✔ Storing value labels in 'value_labels_df.yml'. load_data() #> ✔ Loading original data from 'df.csv'. #> ✖ No valid codebook found. #> Warning: Object 'df' already exists in the environment designated by 'envir', and will be replaced with the contents of 'df.csv'. data #> function (..., list = character(), package = NULL, lib.loc = NULL, #> verbose = getOption(\"verbose\"), envir = .GlobalEnv, overwrite = TRUE) #> { #> fileExt <- function(x) { #> db <- grepl(\"\\\\.[^.]+\\\\.(gz|bz2|xz)$\", x) #> ans <- sub(\".*\\\\.\", \"\", x) #> ans[db] <- sub(\".*\\\\.([^.]+\\\\.)(gz|bz2|xz)$\", \"\\\\1\\\\2\", #> x[db]) #> ans #> } #> my_read_table <- function(...) { #> lcc <- Sys.getlocale(\"LC_COLLATE\") #> on.exit(Sys.setlocale(\"LC_COLLATE\", lcc)) #> Sys.setlocale(\"LC_COLLATE\", \"C\") #> read.table(...) #> } #> stopifnot(is.character(list)) #> names <- c(as.character(substitute(list(...))[-1L]), list) #> if (!is.null(package)) { #> if (!is.character(package)) #> stop(\"'package' must be a character vector or NULL\") #> } #> paths <- find.package(package, lib.loc, verbose = verbose) #> if (is.null(lib.loc)) #> paths <- c(path.package(package, TRUE), if (!length(package)) getwd(), #> paths) #> paths <- unique(normalizePath(paths[file.exists(paths)])) #> paths <- paths[dir.exists(file.path(paths, \"data\"))] #> dataExts <- tools:::.make_file_exts(\"data\") #> if (length(names) == 0L) { #> db <- matrix(character(), nrow = 0L, ncol = 4L) #> for (path in paths) { #> entries <- NULL #> packageName <- if (file_test(\"-f\", file.path(path, #> \"DESCRIPTION\"))) #> basename(path) #> else \".\" #> if (file_test(\"-f\", INDEX <- file.path(path, \"Meta\", #> \"data.rds\"))) { #> entries <- readRDS(INDEX) #> } #> else { #> dataDir <- file.path(path, \"data\") #> entries <- tools::list_files_with_type(dataDir, #> \"data\") #> if (length(entries)) { #> entries <- unique(tools::file_path_sans_ext(basename(entries))) #> entries <- cbind(entries, \"\") #> } #> } #> if (NROW(entries)) { #> if (is.matrix(entries) && ncol(entries) == 2L) #> db <- rbind(db, cbind(packageName, dirname(path), #> entries)) #> else warning(gettextf(\"data index for package %s is invalid and will be ignored\", #> sQuote(packageName)), domain = NA, call. = FALSE) #> } #> } #> colnames(db) <- c(\"Package\", \"LibPath\", \"Item\", \"Title\") #> footer <- if (missing(package)) #> paste0(\"Use \", sQuote(paste(\"data(package =\", \".packages(all.available = TRUE))\")), #> \"\\n\", \"to list the data sets in all *available* packages.\") #> else NULL #> y <- list(title = \"Data sets\", header = NULL, results = db, #> footer = footer) #> class(y) <- \"packageIQR\" #> return(y) #> } #> paths <- file.path(paths, \"data\") #> for (name in names) { #> found <- FALSE #> for (p in paths) { #> tmp_env <- if (overwrite) #> envir #> else new.env() #> if (file_test(\"-f\", file.path(p, \"Rdata.rds\"))) { #> rds <- readRDS(file.path(p, \"Rdata.rds\")) #> if (name %in% names(rds)) { #> found <- TRUE #> if (verbose) #> message(sprintf(\"name=%s:\\t found in Rdata.rds\", #> name), domain = NA) #> thispkg <- sub(\".*/([^/]*)/data$\", \"\\\\1\", p) #> thispkg <- sub(\"_.*$\", \"\", thispkg) #> thispkg <- paste0(\"package:\", thispkg) #> objs <- rds[[name]] #> lazyLoad(file.path(p, \"Rdata\"), envir = tmp_env, #> filter = function(x) x %in% objs) #> break #> } #> else if (verbose) #> message(sprintf(\"name=%s:\\t NOT found in names() of Rdata.rds, i.e.,\\n\\t%s\\n\", #> name, paste(names(rds), collapse = \",\")), #> domain = NA) #> } #> files <- list.files(p, full.names = TRUE) #> files <- files[grep(name, files, fixed = TRUE)] #> if (length(files) > 1L) { #> o <- match(fileExt(files), dataExts, nomatch = 100L) #> paths0 <- dirname(files) #> paths0 <- factor(paths0, levels = unique(paths0)) #> files <- files[order(paths0, o)] #> } #> if (length(files)) { #> for (file in files) { #> if (verbose) #> message(\"name=\", name, \":\\t file= ...\", .Platform$file.sep, #> basename(file), \"::\\t\", appendLF = FALSE, #> domain = NA) #> ext <- fileExt(file) #> if (basename(file) != paste0(name, \".\", ext)) #> found <- FALSE #> else { #> found <- TRUE #> switch(ext, R = , r = { #> library(\"utils\") #> sys.source(file, chdir = TRUE, envir = tmp_env) #> }, RData = , rdata = , rda = load(file, envir = tmp_env), #> TXT = , txt = , tab = , tab.gz = , tab.bz2 = , #> tab.xz = , txt.gz = , txt.bz2 = , txt.xz = assign(name, #> my_read_table(file, header = TRUE, as.is = FALSE), #> envir = tmp_env), CSV = , csv = , csv.gz = , #> csv.bz2 = , csv.xz = assign(name, my_read_table(file, #> header = TRUE, sep = \";\", as.is = FALSE), #> envir = tmp_env), found <- FALSE) #> } #> if (found) #> break #> } #> if (verbose) #> message(if (!found) #> \"*NOT* \", \"found\", domain = NA) #> } #> if (found) #> break #> } #> if (!found) { #> warning(gettextf(\"data set %s not found\", sQuote(name)), #> domain = NA) #> } #> else if (!overwrite) { #> for (o in ls(envir = tmp_env, all.names = TRUE)) { #> if (exists(o, envir = envir, inherits = FALSE)) #> warning(gettextf(\"an object named %s already exists and will not be overwritten\", #> sQuote(o))) #> else assign(o, get(o, envir = tmp_env, inherits = FALSE), #> envir = envir) #> } #> rm(tmp_env) #> } #> } #> invisible(names) #> } #> #> rm(\"data\") #> Warning: object 'data' not found file.remove(\"data.csv\") #> Warning: cannot remove file 'data.csv', reason 'No such file or directory' #> [1] FALSE load_data() #> ✔ Loading original data from 'df.csv'. #> ✖ No valid codebook found. #> Warning: Object 'df' already exists in the environment designated by 'envir', and will be replaced with the contents of 'df.csv'. data #> function (..., list = character(), package = NULL, lib.loc = NULL, #> verbose = getOption(\"verbose\"), envir = .GlobalEnv, overwrite = TRUE) #> { #> fileExt <- function(x) { #> db <- grepl(\"\\\\.[^.]+\\\\.(gz|bz2|xz)$\", x) #> ans <- sub(\".*\\\\.\", \"\", x) #> ans[db] <- sub(\".*\\\\.([^.]+\\\\.)(gz|bz2|xz)$\", \"\\\\1\\\\2\", #> x[db]) #> ans #> } #> my_read_table <- function(...) { #> lcc <- Sys.getlocale(\"LC_COLLATE\") #> on.exit(Sys.setlocale(\"LC_COLLATE\", lcc)) #> Sys.setlocale(\"LC_COLLATE\", \"C\") #> read.table(...) #> } #> stopifnot(is.character(list)) #> names <- c(as.character(substitute(list(...))[-1L]), list) #> if (!is.null(package)) { #> if (!is.character(package)) #> stop(\"'package' must be a character vector or NULL\") #> } #> paths <- find.package(package, lib.loc, verbose = verbose) #> if (is.null(lib.loc)) #> paths <- c(path.package(package, TRUE), if (!length(package)) getwd(), #> paths) #> paths <- unique(normalizePath(paths[file.exists(paths)])) #> paths <- paths[dir.exists(file.path(paths, \"data\"))] #> dataExts <- tools:::.make_file_exts(\"data\") #> if (length(names) == 0L) { #> db <- matrix(character(), nrow = 0L, ncol = 4L) #> for (path in paths) { #> entries <- NULL #> packageName <- if (file_test(\"-f\", file.path(path, #> \"DESCRIPTION\"))) #> basename(path) #> else \".\" #> if (file_test(\"-f\", INDEX <- file.path(path, \"Meta\", #> \"data.rds\"))) { #> entries <- readRDS(INDEX) #> } #> else { #> dataDir <- file.path(path, \"data\") #> entries <- tools::list_files_with_type(dataDir, #> \"data\") #> if (length(entries)) { #> entries <- unique(tools::file_path_sans_ext(basename(entries))) #> entries <- cbind(entries, \"\") #> } #> } #> if (NROW(entries)) { #> if (is.matrix(entries) && ncol(entries) == 2L) #> db <- rbind(db, cbind(packageName, dirname(path), #> entries)) #> else warning(gettextf(\"data index for package %s is invalid and will be ignored\", #> sQuote(packageName)), domain = NA, call. = FALSE) #> } #> } #> colnames(db) <- c(\"Package\", \"LibPath\", \"Item\", \"Title\") #> footer <- if (missing(package)) #> paste0(\"Use \", sQuote(paste(\"data(package =\", \".packages(all.available = TRUE))\")), #> \"\\n\", \"to list the data sets in all *available* packages.\") #> else NULL #> y <- list(title = \"Data sets\", header = NULL, results = db, #> footer = footer) #> class(y) <- \"packageIQR\" #> return(y) #> } #> paths <- file.path(paths, \"data\") #> for (name in names) { #> found <- FALSE #> for (p in paths) { #> tmp_env <- if (overwrite) #> envir #> else new.env() #> if (file_test(\"-f\", file.path(p, \"Rdata.rds\"))) { #> rds <- readRDS(file.path(p, \"Rdata.rds\")) #> if (name %in% names(rds)) { #> found <- TRUE #> if (verbose) #> message(sprintf(\"name=%s:\\t found in Rdata.rds\", #> name), domain = NA) #> thispkg <- sub(\".*/([^/]*)/data$\", \"\\\\1\", p) #> thispkg <- sub(\"_.*$\", \"\", thispkg) #> thispkg <- paste0(\"package:\", thispkg) #> objs <- rds[[name]] #> lazyLoad(file.path(p, \"Rdata\"), envir = tmp_env, #> filter = function(x) x %in% objs) #> break #> } #> else if (verbose) #> message(sprintf(\"name=%s:\\t NOT found in names() of Rdata.rds, i.e.,\\n\\t%s\\n\", #> name, paste(names(rds), collapse = \",\")), #> domain = NA) #> } #> files <- list.files(p, full.names = TRUE) #> files <- files[grep(name, files, fixed = TRUE)] #> if (length(files) > 1L) { #> o <- match(fileExt(files), dataExts, nomatch = 100L) #> paths0 <- dirname(files) #> paths0 <- factor(paths0, levels = unique(paths0)) #> files <- files[order(paths0, o)] #> } #> if (length(files)) { #> for (file in files) { #> if (verbose) #> message(\"name=\", name, \":\\t file= ...\", .Platform$file.sep, #> basename(file), \"::\\t\", appendLF = FALSE, #> domain = NA) #> ext <- fileExt(file) #> if (basename(file) != paste0(name, \".\", ext)) #> found <- FALSE #> else { #> found <- TRUE #> switch(ext, R = , r = { #> library(\"utils\") #> sys.source(file, chdir = TRUE, envir = tmp_env) #> }, RData = , rdata = , rda = load(file, envir = tmp_env), #> TXT = , txt = , tab = , tab.gz = , tab.bz2 = , #> tab.xz = , txt.gz = , txt.bz2 = , txt.xz = assign(name, #> my_read_table(file, header = TRUE, as.is = FALSE), #> envir = tmp_env), CSV = , csv = , csv.gz = , #> csv.bz2 = , csv.xz = assign(name, my_read_table(file, #> header = TRUE, sep = \";\", as.is = FALSE), #> envir = tmp_env), found <- FALSE) #> } #> if (found) #> break #> } #> if (verbose) #> message(if (!found) #> \"*NOT* \", \"found\", domain = NA) #> } #> if (found) #> break #> } #> if (!found) { #> warning(gettextf(\"data set %s not found\", sQuote(name)), #> domain = NA) #> } #> else if (!overwrite) { #> for (o in ls(envir = tmp_env, all.names = TRUE)) { #> if (exists(o, envir = envir, inherits = FALSE)) #> warning(gettextf(\"an object named %s already exists and will not be overwritten\", #> sQuote(o))) #> else assign(o, get(o, envir = tmp_env, inherits = FALSE), #> envir = envir) #> } #> rm(tmp_env) #> } #> } #> invisible(names) #> } #> #> setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Load project entry points — load_entrypoint","title":"Load project entry points — load_entrypoint","text":"Loads designated project entry point default editor, using file.edit.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load project entry points — load_entrypoint","text":"","code":"load_entrypoint(worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load project entry points — load_entrypoint","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments passed file.edit.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load project entry points — load_entrypoint","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/load_entrypoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load project entry points — load_entrypoint","text":"","code":"if (FALSE) { # Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"entrypoint\") dir.create(test_dir) setwd(test_dir) # Prepare worcs file and dummy entry point worcs:::write_worcsfile(\".worcs\", entry_point = \"test.txt\") writeLines(\"Hello world\", con = file(\"test.txt\", \"w\")) # Demonstrate load_entrypoint() load_entrypoint() # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE) }"},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":null,"dir":"Reference","previous_headings":"","what":"Notify the user when synthetic data are being used — notify_synthetic","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"function prints notification message data used project synthetic (see closed_data synthetic). See details important information.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"","code":"notify_synthetic(..., msg = NULL)"},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"... Objects class worcs_data. function check original synthetic data. msg Expression containing message print case worcs_data original. message may refer is_synth, logical vector indicating worcs_data objects synthetic.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"return value. function called side effect printing notification message.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"preferred way use function provide specific data objects function call, using ... argument. objects provided, notify_synthetic scan parent environment objects class worcs_data. function emphatically designed included 'R Markdown' file, dynamically generate notification message third party 'Knits' document without access original data.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/notify_synthetic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Notify the user when synthetic data are being used — notify_synthetic","text":"","code":"df <- iris class(df) <- c(\"worcs_data\", class(df)) attr(df, \"type\") <- \"synthetic\" notify_synthetic(df, msg = \"synthetic\") #> synthetic"},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Use open data in WORCS project — open_data","title":"Use open data in WORCS project — open_data","text":"function saves data.frame .csv file (using write.csv), stores checksum '.worcs', amends .gitignore file exclude filename.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use open data in WORCS project — open_data","text":"","code":"open_data( data, filename = paste0(deparse(substitute(data)), \".csv\"), codebook = paste0(\"codebook_\", deparse(substitute(data)), \".Rmd\"), value_labels = paste0(\"value_labels_\", deparse(substitute(data)), \".yml\"), worcs_directory = \".\", save_expression = write.csv(x = data, file = filename, row.names = FALSE), load_expression = read.csv(file = filename, stringsAsFactors = TRUE), ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use open data in WORCS project — open_data","text":"data data.frame save. filename Character, naming file data written . default, constructs filename name object passed data. codebook Character, naming file codebook written . 'R Markdown' codebook created rendered github_document ('markdown' 'GitHub'). default, constructs filename name object passed data, adding word 'codebook'. Set argument NULL avoid creating codebook. value_labels Character, naming file value labels factors ordinal variables written . default, constructs filename name object passed data, adding word 'value_labels'. Set argument NULL avoid creating file value labels. worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. save_expression R-expression used save data. Defaults write.csv(x = data, file = filename, row.names = FALSE), writes comma-separated, spreadsheet-style file. arguments data filename passed open_data() expression defined save_expression. load_expression R-expression used load data file created save_expression. Defaults read.csv(file = filename, stringsAsFactors = TRUE). expression stored project's .worcs file, invoked load_data(). ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use open data in WORCS project — open_data","text":"Returns NULL invisibly. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/open_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use open data in WORCS project — open_data","text":"","code":"test_dir <- file.path(tempdir(), \"data\") old_wd <- getwd() dir.create(test_dir) setwd(test_dir) worcs:::write_worcsfile(\".worcs\") df <- iris[1:5, ] open_data(df, codebook = NULL) #> ✔ Storing original data in 'df.csv' and updating the checksum in '.worcs'. #> ✔ Updating '.gitignore'. #> ✔ Storing value labels in 'value_labels_df.yml'. setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":null,"dir":"Reference","previous_headings":"","what":"Report formatted number — report","title":"Report formatted number — report","text":"Report number, rounded specific number decimals (defaults two), using formatC. Intended 'R Markdown' reports.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report formatted number — report","text":"","code":"report(x, digits = 2, equals = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report formatted number — report","text":"x Numeric. Value reported digits Integer. Number digits round . equals Logical. Whether report equals (: smaller ) sign.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report formatted number — report","text":"atomic character vector.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Report formatted number — report","text":"Caspar J. van Lissa","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/report.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report formatted number — report","text":"","code":"report(.0234) #> [1] \"= 0.02\""},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":null,"dir":"Reference","previous_headings":"","what":"Reproduce WORCS Project — reproduce","title":"Reproduce WORCS Project — reproduce","text":"Evaluate recipe contained WORCS project derive endpoints.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reproduce WORCS Project — reproduce","text":"","code":"reproduce(worcs_directory = \".\", verbose = TRUE, check_endpoints = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reproduce WORCS Project — reproduce","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE check_endpoints Logical. Whether call check_endpoints() reproducing recipe. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reproduce WORCS Project — reproduce","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/reproduce.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reproduce WORCS Project — reproduce","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"reproduce\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE worcs:::add_recipe(recipe = 'writeLines(\"test\", \"test.txt\")') #> ✔ Adding recipe to '.worcs'. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate skew and kurtosis — skew_kurtosis","title":"Calculate skew and kurtosis — skew_kurtosis","text":"Calculate skew kurtosis, standard errors , estimates divided two times standard error. latter quantity exceeds absolute value 1, skew/kurtosis significant. large sample sizes, significant skew/kurtosis common.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate skew and kurtosis — skew_kurtosis","text":"","code":"skew_kurtosis(x, verbose = FALSE, se = FALSE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate skew and kurtosis — skew_kurtosis","text":"x object method exists. verbose Logical. Whether print messages console, Default: FALSE se Whether return standard errors, Default: FALSE ... Additional arguments pass functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate skew and kurtosis — skew_kurtosis","text":"matrix skew kurtosis statistics x.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/skew_kurtosis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate skew and kurtosis — skew_kurtosis","text":"","code":"skew_kurtosis(datasets::anscombe) #> skew skew_2se kurt kurt_2se #> x1 0.00000000 0.0000000 -1.5289256 -0.5975093 #> x2 0.00000000 0.0000000 -1.5289256 -0.5975093 #> x3 0.00000000 0.0000000 -1.5289256 -0.5975093 #> x4 2.46691100 1.8669273 4.5206612 1.7666896 #> y1 -0.04837355 -0.0366085 -1.1991228 -0.4686212 #> y2 -0.97869294 -0.7406626 -0.5143191 -0.2009976 #> y3 1.38012040 1.0444578 1.2400439 0.4846133 #> y4 1.12077386 0.8481876 0.6287512 0.2457181"},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Snapshot endpoints in WORCS project — snapshot_endpoints","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"Update checksums endpoints WORCS project.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"","code":"snapshot_endpoints(worcs_directory = \".\", verbose = TRUE, ...)"},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"worcs_directory Character, indicating WORCS project directory save data. default value \".\" points current directory. Default: '.' verbose Logical. Whether print status messages console. Default: TRUE ... Additional arguments.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"return value. function called side effects.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/snapshot_endpoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Snapshot endpoints in WORCS project — snapshot_endpoints","text":"","code":"# Create directory to run the example old_wd <- getwd() test_dir <- file.path(tempdir(), \"update_endpoint\") dir.create(test_dir) setwd(test_dir) file.create(\".worcs\") #> [1] TRUE writeLines(\"test\", \"test.txt\") add_endpoint(\"test.txt\") #> ✔ Adding endpoint 'test.txt' to '.worcs'. writeLines(\"second test\", \"test.txt\") snapshot_endpoints() #> ✔ Update snapshot of endpoint 'test.txt'. # Cleaning example directory setwd(old_wd) unlink(test_dir, recursive = TRUE)"},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate synthetic data — synthetic","title":"Generate synthetic data — synthetic","text":"Generates synthetic version data.frame, similar characteristics original. See Details algorithm used.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate synthetic data — synthetic","text":"","code":"synthetic( data, model_expression = ranger(x = x, y = y), predict_expression = predict(model, data = xsynth)$predictions, missingness_expression = NULL, verbose = TRUE )"},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate synthetic data — synthetic","text":"data data.frame make synthetic version. model_expression R-expression estimate model. Defaults ranger(x = x, y = y), uses fast implementation random forests ranger. expression evaluated environment containing objects x y, x data.frame predictor variables, y vector outcome values (see Details). predict_expression R-expression generate predicted values based model estimated model_expression. Defaults predict(model, data = xsynth)$predictions. expression must return vector predicted values. expression evaluated environment containing objects model xsynth, model model estimated model_expression, xsynth data.frame synthetic data used predict next column (see Details). missingness_expression Optional. R-expression impute missing values. Defaults NULL, means listwise deletion used. expression evaluated environment containing object data, specified call synthetic. must return data.frame dimensions column names original data. example, use missingness_expression = missRanger::missRanger(data = data) fast implementation excellent 'missForest' single imputation technique. verbose Logical, Default: TRUE. Whether show progress bar running algorithm provide informative messages.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate synthetic data — synthetic","text":"data.frame synthetic data, based data.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate synthetic data — synthetic","text":"Based work Nowok, Raab, Dibben (2016), function uses simple algorithm generate synthetic dataset similar characteristics original. algorithm follows: Let x original data.frame, columns 1:j Let xsynth synthetic data.frame, columns 1:j Column 1 xsynth bootstrapped version column 1 x Using model_expression, predictive model built column c, c along 2:j, c predicted columns 1:(c-1) original data. Using predict_expression, columns 1:(c-1) synthetic data used predict synthetic values column c. Variables thus imputed order occurrence data.frame. impute different order, reorder data. Note , data synthesis work properly, essential class variables defined correctly. default algorithm ranger supports numeric, integer, factor types. types variables converted one types, users can use custom model_expression predict_expressio calling synthetic. Note data synthesis work properly, essential class variables defined correctly. default algorithm ranger supports numeric, integer, factor, logical data. types variables converted one types. Users can provide use custom model_expression predict_expression use different algorithm calling synthetic. demonstrated example, users call lm model_expression use linear regression, preserves linear marginal relationships can give rise values range original data. users call sample predict_expression bootstrap variable, quick solution maintains univariate distributions loses marginal relationships. examples exhaustive, users can even create custom functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate synthetic data — synthetic","text":"Nowok, B., Raab, G.M Dibben, C. (2016). synthpop: Bespoke creation synthetic data R. Journal Statistical Software, 74(11), 1-26. doi:10.18637/jss.v074.i11 .","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/synthetic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate synthetic data — synthetic","text":"","code":"if (FALSE) { # Example using the iris dataset and default ranger algorithm iris_syn <- synthetic(iris) # Example using lm as prediction algorithm (only works for numeric variables) # note that, within the model_expression, a new data.frame is created because # lm() requires a separate data argument: dat <- iris[, 1:4] synthetic(dat, model_expression = lm(.outcome ~ ., data = data.frame(.outcome = y, xsynth)), predict_expression = predict(model, newdata = xsynth)) } # Example using bootstrapping: synthetic(iris, model_expression = NULL, predict_expression = sample(y, size = length(y), replace = TRUE)) #> | | | 0% | |============== | 20% | |============================ | 40% | |========================================== | 60% | |======================================================== | 80% | |======================================================================| 100% #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> 1 4.6 3.3 4.6 0.2 virginica #> 2 4.4 3.8 3.9 0.4 setosa #> 3 6.1 2.7 5.0 0.2 versicolor #> 4 5.4 2.9 1.6 1.8 setosa #> 5 5.6 3.3 1.5 2.3 versicolor #> 6 4.4 2.8 4.5 0.2 setosa #> 7 5.9 3.2 1.4 1.3 versicolor #> 8 4.9 3.0 1.4 1.3 versicolor #> 9 6.5 3.1 3.6 1.9 virginica #> 10 5.4 3.0 4.9 0.2 versicolor #> 11 5.1 3.5 4.9 0.2 setosa #> 12 5.6 2.7 1.5 2.2 setosa #> 13 6.4 3.0 1.5 1.8 versicolor #> 14 5.6 2.7 1.5 1.4 versicolor #> 15 5.6 3.3 4.0 1.6 versicolor #> 16 4.8 2.5 4.2 1.6 virginica #> 17 5.0 3.1 4.2 1.3 setosa #> 18 7.3 2.8 4.2 2.4 virginica #> 19 5.8 3.0 1.3 2.1 virginica #> 20 6.1 3.2 4.1 0.2 versicolor #> 21 5.2 3.2 1.5 0.2 setosa #> 22 4.6 2.8 1.7 0.3 versicolor #> 23 6.4 3.4 4.5 2.1 setosa #> 24 4.9 3.4 3.5 2.3 virginica #> 25 7.2 3.1 5.1 2.5 virginica #> 26 6.7 3.2 5.5 1.8 setosa #> 27 7.6 3.1 1.7 0.4 setosa #> 28 7.4 2.8 1.5 2.1 setosa #> 29 4.9 3.3 1.3 1.7 versicolor #> 30 5.6 2.2 4.5 1.9 versicolor #> 31 6.3 4.1 1.9 1.0 setosa #> 32 5.9 3.2 1.6 2.3 versicolor #> 33 6.3 2.5 1.3 2.0 versicolor #> 34 4.9 3.0 1.4 0.2 virginica #> 35 6.1 2.6 4.9 1.4 virginica #> 36 5.1 2.2 4.5 0.1 virginica #> 37 4.8 3.2 5.1 1.0 versicolor #> 38 5.0 3.1 5.7 1.5 versicolor #> 39 4.5 3.6 3.0 1.8 setosa #> 40 6.7 3.2 1.5 2.3 virginica #> 41 5.8 3.0 4.9 1.1 virginica #> 42 7.1 3.1 1.4 0.4 setosa #> 43 5.0 2.7 1.9 1.3 setosa #> 44 5.2 2.8 1.3 2.3 virginica #> 45 4.3 3.0 3.3 0.1 setosa #> 46 5.0 3.4 4.1 0.2 setosa #> 47 5.8 2.7 4.4 0.3 setosa #> 48 6.3 3.1 1.5 0.2 virginica #> 49 5.4 3.5 5.8 2.4 setosa #> 50 4.8 2.7 3.5 0.2 setosa #> 51 5.7 3.4 1.4 0.3 setosa #> 52 6.8 2.5 1.4 1.8 versicolor #> 53 5.4 2.8 4.5 0.2 versicolor #> 54 6.5 3.4 5.0 2.0 versicolor #> 55 5.4 2.6 1.3 1.3 virginica #> 56 5.0 3.9 5.0 1.5 versicolor #> 57 4.6 2.8 4.6 2.0 versicolor #> 58 5.5 3.4 5.6 1.3 versicolor #> 59 6.3 3.4 1.4 1.0 virginica #> 60 7.0 3.0 1.6 2.5 versicolor #> 61 6.5 3.4 4.6 0.4 setosa #> 62 6.7 3.2 3.3 1.3 virginica #> 63 4.8 2.9 5.7 1.3 virginica #> 64 6.9 2.9 1.6 0.2 virginica #> 65 5.1 3.0 1.4 1.2 versicolor #> 66 4.6 3.4 1.5 1.6 virginica #> 67 5.0 3.8 5.0 1.8 versicolor #> 68 5.5 2.9 1.2 1.3 virginica #> 69 5.0 3.1 4.0 1.4 virginica #> 70 6.3 3.4 1.5 1.2 virginica #> 71 7.0 3.5 6.1 2.0 setosa #> 72 6.1 2.9 4.6 1.8 versicolor #> 73 6.7 3.0 1.9 2.0 versicolor #> 74 4.8 3.2 1.4 1.0 virginica #> 75 4.4 2.4 1.5 1.8 setosa #> 76 4.7 3.2 5.6 1.7 setosa #> 77 4.6 3.2 3.3 2.4 versicolor #> 78 4.8 3.0 6.1 2.1 virginica #> 79 4.4 3.0 1.4 2.1 setosa #> 80 6.0 2.6 5.4 1.3 setosa #> 81 4.5 3.4 1.5 1.9 virginica #> 82 5.1 3.5 4.0 0.3 versicolor #> 83 6.8 2.3 4.9 1.6 versicolor #> 84 5.8 2.0 4.8 1.5 virginica #> 85 5.0 2.8 5.1 2.5 virginica #> 86 5.4 3.1 5.6 1.8 setosa #> 87 4.9 2.8 6.1 1.0 setosa #> 88 5.2 2.7 5.8 1.4 virginica #> 89 6.1 3.4 1.6 1.4 setosa #> 90 5.8 4.2 4.5 1.4 setosa #> 91 6.9 3.2 4.4 1.6 versicolor #> 92 6.7 3.2 1.4 1.4 setosa #> 93 5.5 3.5 4.5 0.1 virginica #> 94 7.3 3.1 6.0 1.1 versicolor #> 95 7.9 3.5 3.0 0.2 versicolor #> 96 5.8 2.7 6.4 1.9 virginica #> 97 5.7 2.6 4.2 1.3 versicolor #> 98 6.4 2.3 1.5 0.2 setosa #> 99 6.7 3.1 4.8 2.4 virginica #> 100 4.8 3.9 4.5 0.2 versicolor #> 101 5.1 3.8 4.7 2.5 versicolor #> 102 5.6 2.4 1.7 1.8 versicolor #> 103 4.9 4.1 5.6 1.3 setosa #> 104 6.3 3.9 1.0 1.4 virginica #> 105 5.6 2.9 5.7 1.0 setosa #> 106 5.2 3.3 1.4 1.3 versicolor #> 107 5.3 3.1 5.7 0.2 versicolor #> 108 6.0 4.4 1.3 0.2 versicolor #> 109 4.6 2.7 4.7 1.9 setosa #> 110 6.3 3.5 1.4 1.0 versicolor #> 111 4.8 3.4 3.0 1.3 versicolor #> 112 5.5 3.1 4.3 1.5 virginica #> 113 5.1 3.3 1.1 2.2 setosa #> 114 6.1 2.8 4.7 2.4 virginica #> 115 6.1 2.7 5.2 2.5 virginica #> 116 6.3 2.0 1.7 0.2 setosa #> 117 4.8 2.8 4.8 2.0 versicolor #> 118 4.7 3.0 4.7 1.3 virginica #> 119 6.8 2.4 4.7 1.2 versicolor #> 120 6.1 3.0 1.3 0.3 virginica #> 121 6.9 3.0 1.5 1.3 versicolor #> 122 6.7 4.2 1.4 1.5 setosa #> 123 5.9 3.4 5.1 1.0 versicolor #> 124 5.0 3.9 1.6 1.5 versicolor #> 125 6.1 2.8 1.3 0.2 virginica #> 126 6.3 2.0 4.0 1.3 setosa #> 127 6.5 3.6 1.7 1.3 setosa #> 128 7.2 3.2 3.7 1.4 versicolor #> 129 6.3 2.5 1.6 0.2 setosa #> 130 4.4 3.2 5.2 2.0 setosa #> 131 5.2 3.2 4.5 1.5 versicolor #> 132 5.7 3.4 4.7 0.2 versicolor #> 133 6.7 3.0 5.6 2.3 setosa #> 134 5.8 3.4 5.1 0.4 virginica #> 135 4.9 2.9 3.9 0.2 setosa #> 136 5.4 3.6 3.0 2.5 versicolor #> 137 5.6 3.1 5.5 0.2 setosa #> 138 5.2 3.3 3.6 1.4 setosa #> 139 4.8 2.5 5.0 0.2 versicolor #> 140 6.7 3.0 5.6 2.0 setosa #> 141 6.4 3.1 4.9 1.9 virginica #> 142 4.4 2.5 1.5 0.6 virginica #> 143 6.4 3.1 4.6 0.1 setosa #> 144 7.7 3.6 1.6 0.3 setosa #> 145 6.5 3.0 1.7 1.9 versicolor #> 146 5.2 2.7 1.4 1.9 setosa #> 147 6.0 3.2 1.3 2.5 virginica #> 148 6.0 2.8 1.4 0.2 setosa #> 149 5.5 2.8 5.1 1.8 setosa #> 150 4.5 3.2 5.1 2.0 versicolor if (FALSE) { # Example with missing data, no imputation iris_missings <- iris for(i in 1:10){ iris_missings[sample.int(nrow(iris_missings), 1, replace = TRUE), sample.int(ncol(iris_missings), 1, replace = TRUE)] <- NA } iris_miss_syn <- synthetic(iris_missings) # Example with missing data, imputation by median/mode substitution # First, define a simple function for median/mode substitution: imp_fun <- function(x){ if(is.data.frame(x)){ return(data.frame(sapply(x, imp_fun))) } else { out <- x if(inherits(x, \"numeric\")){ out[is.na(out)] <- median(x[!is.na(out)]) } else { out[is.na(out)] <- names(sort(table(out), decreasing = TRUE))[1] } out } } # Then, call synthetic() with this function as missingness_expression: iris_miss_syn <- synthetic(iris_missings, missingness_expression = imp_fun(data)) }"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":null,"dir":"Reference","previous_headings":"","what":"Add WORCS badge to README.md — worcs_badge","title":"Add WORCS badge to README.md — worcs_badge","text":"Evaluates whether project meets criteria WORCS checklist (see worcs_checklist), adds badge project's README.md.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add WORCS badge to README.md — worcs_badge","text":"","code":"worcs_badge( path = \".\", update_readme = \"README.md\", update_csv = \"checklist.csv\" )"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add WORCS badge to README.md — worcs_badge","text":"path Character. can either path WORCS project folder (project .worcs file), path checklist.csv file. latter useful want evaluate manually updated checklist file. Default: '.' (path current directory). update_readme Character. Path README.md file add badge . Default: 'README.md'. Set NULL avoid updating README.md file. update_csv Character. Path README.md file add badge . Default: 'checklist.csv'. Set NULL avoid updating checklist.csv file.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add WORCS badge to README.md — worcs_badge","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_badge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add WORCS badge to README.md — worcs_badge","text":"","code":"example_dir <- file.path(tempdir(), \"badge\") dir.create(example_dir) #> Warning: 'C:\\Users\\vanlissa\\AppData\\Local\\Temp\\RtmpcP5twp\\badge' already exists write(\"a\", file.path(example_dir, \".worcs\")) worcs_badge(path = example_dir, update_readme = NULL)"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_checklist.html","id":null,"dir":"Reference","previous_headings":"","what":"WORCS checklist — worcs_checklist","title":"WORCS checklist — worcs_checklist","text":"checklist can used see whether project adheres principles open reproducible code science, set WORCS paper.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_checklist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"WORCS checklist — worcs_checklist","text":"","code":"data(worcs_checklist)"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_checklist.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"WORCS checklist — worcs_checklist","text":"data frame 15 rows 5 variables.","code":""},{"path":[]},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_checklist.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"WORCS checklist — worcs_checklist","text":"Van Lissa, C. J., Brandmaier, . M., Brinkman, L., Lamprecht, ., Peikert, ., , Struiksma, M. E., & Vreede, B. (2021) doi:10.3233/DS-210031 .","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Create new WORCS project — worcs_project","title":"Create new WORCS project — worcs_project","text":"Creates new 'worcs' project. function invoked 'RStudio' project template manager, can also called directly create WORCS project syntax console.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create new WORCS project — worcs_project","text":"","code":"worcs_project( path = \"worcs_project\", manuscript = \"APA6\", preregistration = \"cos_prereg\", add_license = \"CC_BY_4.0\", use_renv = TRUE, use_targets = FALSE, remote_repo = \"https\", verbose = TRUE, ... )"},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create new WORCS project — worcs_project","text":"path Character, indicating directory create 'worcs' project. Default: 'worcs_project'. manuscript Character, indicating template use 'R Markdown' manuscript. Default: 'APA6'. Available choices include APA6 papaja package, github_document, templates included rticles package. information, see add_manuscript. preregistration Character, indicating template use preregistration. Default: 'cos_prereg'. Available choices include: \"PSS\", \"Secondary\", \"None\", templates prereg package. information, see add_preregistration. add_license Character, indicating license include. Default: 'CC_BY_4.0'. Available options include: \"CC_BY_4.0\", \"CC_BY-SA_4.0\", \"CC_BY-NC_4.0\", \"CC_BY-NC-SA_4.0\", \"CC_BY-ND_4.0\", \"CC_BY-NC-ND_4.0\", \"None\". information, see https://creativecommons.org/licenses/. use_renv Logical, indicating whether use 'renv' make project reproducible. Default: TRUE. See init. use_targets Logical, indicating whether use 'targets' create Make-like pipeline. Default: FALSE See targets-package. remote_repo Character, address remote repository project. link form https://github.com[username][repo].git (preferred) git@[...].git (using SSH). valid remote repository link provided, commit made containing 'README.md' file, pushed remote repository. Default: 'https'. verbose Logical. Whether print messages console project creation. Default: TRUE ... Additional arguments passed functions.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create new WORCS project — worcs_project","text":"return value. function called side effects.","code":""},{"path":"https://cjvanlissa.github.io/worcs/reference/worcs_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create new WORCS project — worcs_project","text":"","code":"the_test <- \"worcs_template\" old_wd <- getwd() dir.create(file.path(tempdir(), the_test)) do.call(git_user, worcs:::get_user()) #> To set the 'Git' username and email, call 'git_user()' with the argument 'overwrite = TRUE'. worcs_project(file.path(tempdir(), the_test, \"worcs_project\"), manuscript = \"github_document\", preregistration = \"None\", add_license = \"None\", use_renv = FALSE, remote_repo = \"https\") #> ✔ Initializing 'Git' repository. #> ✔ Writing '.worcs' file. #> ✔ Copying standard files. #> ✔ Creating manuscript files. #> ✔ Adding recipe to '.worcs'. #> ✔ Creating first commit (committing README.md). #> ✖ Not a valid 'Git' remote repository address: https #> ✖ No valid 'GitHub' address provided. You are working with a local 'Git' repository only. setwd(old_wd) unlink(file.path(tempdir(), the_test))"},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0115","dir":"Changelog","previous_headings":"","what":"worcs 0.1.15","title":"worcs 0.1.15","text":"Add integration targets package Stricter enforcement “.Rmd” case filenames avoid Linux errors","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0114","dir":"Changelog","previous_headings":"","what":"worcs 0.1.14","title":"worcs 0.1.14","text":"CRAN release: 2023-10-25 Fix checksum calculated indirectly (e.g., Rmarkdown code chunk) Fix error r-release-linux-x86_64 Fix documentation; replace tags tags Improve handling relative file paths worcs:::save_data()","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0113","dir":"Changelog","previous_headings":"","what":"worcs 0.1.13","title":"worcs 0.1.13","text":"CRAN release: 2023-10-04 Address Prof. Brian Ripley’s comment: “Packages Suggests used conditionally: see ‘Writing R Extensions’. needs corrected even missing package(s) become available. can tested checking _R_CHECK_DEPENDS_ONLY_=true.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0112","dir":"Changelog","previous_headings":"","what":"worcs 0.1.12","title":"worcs 0.1.12","text":"CRAN release: 2023-09-13 Add functions add_recipe() reproduce() check_worcs_installation() longer throws error rticles prereg Add defensive programming save_data() load_data() prevent errors. improvement checksums computed; instead checking Git treats line endings (breaks project longer version controlled, e.g., downloading ZIP GitHub), check files binary. Add github action reproduce repo via github actions: github_action_reproduce() Update vignette(\"Reproduce\"); advice download ZIP GitHub bad practice, ZIP longer version controlled Git.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0111","dir":"Changelog","previous_headings":"","what":"worcs 0.1.11","title":"worcs 0.1.11","text":"CRAN release: 2023-08-22 Checksums computed differently preceding versions, account fact Git changes end line characters breaks consistency checksums across operating systems. Add endpoint functionality: add_endpoint(), snapshot_endpoints(), check_endpoints() Add github action endpoints: github_action_check_endpoints() Improve handling relative filenames save_data() fix bug related file path codebook metadata add function report()","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-0110","dir":"Changelog","previous_headings":"","what":"worcs 0.1.10","title":"worcs 0.1.10","text":"CRAN release: 2022-07-20 Fix breaking bug check_worcs_installation() introduced version 0.1.9 Update setup vignette reflect new GitHub authentication protocols","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-019","dir":"Changelog","previous_headings":"","what":"worcs 0.1.9","title":"worcs 0.1.9","text":"CRAN release: 2022-07-16 closed_data() open_data() now store factor ordered value labels YAML file Added functions data_unlabel() data_label(), respectively coerce factors integer, restore integers factors using metadata stored YAML file load_data() attempts coerce variable classes using codebook, restores ordered levels value_labels YAML file Update templates rticles prereg packages Add check_worcs_installation() function determine whether non-R-package dependencies installed correctly Update references WORCS paper Replace GitHub version papaja CRAN version Fix URLs Update rticles prereg templates Handle literal function names rticles prereg, users can use available options packages without worcs explicitly referencing functions Add arguments ‘save_expression’ ‘load_expression’ closed_data() open_data(). allows users save data different formats. ‘load_expression’ stored .worcs file, referenced load_data().","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-018","dir":"Changelog","previous_headings":"","what":"worcs 0.1.8","title":"worcs 0.1.8","text":"CRAN release: 2021-02-02 Declared pandoc SystemRequirements Made examples using pandoc conditional availability pandoc Functions wrap rmarkdown::render() now return NULL pandoc available","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-017","dir":"Changelog","previous_headings":"","what":"worcs 0.1.7","title":"worcs 0.1.7","text":"CRAN release: 2021-01-21 Fixed failing tests requested dr. Brian Ripley","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-016","dir":"Changelog","previous_headings":"","what":"worcs 0.1.6","title":"worcs 0.1.6","text":"CRAN release: 2020-12-16 Workflow vignette updated address reviewer comments “Data Science” New functions: add_synthetic() notify_synthetic() closed_data() longer wraps errors call synthetic(). Thus, function call fails error data synthesis fails. closed_data() now passes formal arguments synthetic() contained ‘…’ synthetic(). synthetic() now allows ‘y’ referenced ‘predict_expression’ ‘model_expression’ set NULL, thereby enabling bootstrapping. internal function worcs:::col_message() now renders status messages black print instead colored print rmarkdown::render() callstack. avoids errors knitting PDF. See https://github.com/rstudio/rmarkdown/issues/1951 error circumvented fix.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-015","dir":"Changelog","previous_headings":"","what":"worcs 0.1.5","title":"worcs 0.1.5","text":"CRAN release: 2020-10-09 Necessary update due breaking changes dependency gert package Add function add_preregistration() add preregistration later stage Add preregistration templates “PSS” “Secondary”","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-014","dir":"Changelog","previous_headings":"","what":"worcs 0.1.4","title":"worcs 0.1.4","text":"CRAN release: 2020-09-29 Fixed bugs handling filenames open_data() closed_data() codebook.Rmd name object supplied ‘data’ argument default, open_data() closed_data() now construct filenames .csv codebook.Rmd name object supplied ‘data’ argument. also means object loaded name load_data(). Add function add_manuscript() add manuscript later stage Major bugfixes worcs_badge(); function work intended. Fixed now","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-013","dir":"Changelog","previous_headings":"","what":"worcs 0.1.3","title":"worcs 0.1.3","text":"CRAN release: 2020-06-27 Minor bugfixes descriptives() now returns mean() instead sd() descriptives() now returns n missing README.md now correctly shows .Rproj file rticles now declared import","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-012","dir":"Changelog","previous_headings":"","what":"worcs 0.1.2","title":"worcs 0.1.2","text":"CRAN release: 2020-05-30 documentation updated ensure compatibility submitted version WORCS-paper. Authors references WORCS-paper updated include co-authors. Prevent git_user() engaging antisocial behavior, resetting users’ ‘Git’ credentials, adding default argument ‘overwrite = !has_git_user()’. default, function nothing ‘Git’ user credentials already exist. Bug fix load_data() ensure compatibility ‘RMarkdown’ behavior running code chunks .Rmd file directory, instead actual working directory. Bug fix cite_all() cite_essential() allow escaping literal double @. Bug fix export_project(), now respects folder structure within project, also supports relative paths ensure portability, even called different working working directory. Fixing bug required changing working directory calling zip(). change working directory immediately followed call .exit(setwd(oldwd)), line CRAN policy. .worcs file used determine existence worcs-project recursively. .worcs file now tracks entry point analyses.","code":""},{"path":"https://cjvanlissa.github.io/worcs/news/index.html","id":"worcs-011","dir":"Changelog","previous_headings":"","what":"worcs 0.1.1","title":"worcs 0.1.1","text":"CRAN release: 2020-05-18 First CRAN release.","code":""}] diff --git a/vignettes/.gitignore b/vignettes/.gitignore new file mode 100644 index 0000000..101fd9f --- /dev/null +++ b/vignettes/.gitignore @@ -0,0 +1,3 @@ +dat.csv +!synthetic_dat.csv +!codebook_dat.csv