R/yaml_to_prereg_spec.R
import_yaml_or_json.Rd
Convert a (pre)registration specification from YAML or JSON
yaml_to_prereg_spec(x)
The YAML or JSON as character vector, or a path to a file containing the YAML or JSON.
The imported object.
### Get path to example file
examplePreregFile <-
system.file(
"extdata",
"preregr-spec-example1.yml",
package = "preregr"
);
### Load it and show which items are completed
preregr::yaml_to_prereg_spec(
examplePreregFile
) |>
preregr::prereg_show_item_completion();
#>
#> ── Items in (pre)registration specification ────────────────────────────────────
#>
#> ℹ Form: Inclusive General-Purpose Registration Form
#> ℹ Version: 1.1
#>
#> ── Section: Metadata ──
#>
#> ✔ Discipline [discipline]
#> ✔ Title [title]
#> ✔ Author(s) / contributor(s) [authors]
#> ✖ Tasks and roles [tasks_and_roles]
#> ✖ Funding [funding]
#> ✖ Conflicts of interest [cois]
#>
#> ── Section: Background ──
#>
#> ✖ Type of study [type_of_study]
#> ✖ Background [background]
#> ✖ Study stages [stages]
#> ✖ Current study stage [stage]
#> ✖ Start date [start_date]
#> ✖ End date [end_date]
#>
#> ── Section: Methods ──
#>
#> ✖ Primary research question(s) [primary_research_question]
#> ✖ Secondary research question(s) [secondary_research_question]
#> ✖ Expectations / hypotheses [expectations_hypotheses]
#> ✖ Main variable(s) / outcome(s) / dependent variables [main_vars]
#> ✖ Secondary variable(s) / independent variable(s) / intervention(s) / treatment(s) [secondary_vars]
#> ✖ Additional variable(s) / covariate(s) [additional_vars]
#> ✖ Data origin [data_origin]
#> ✖ Data bias minimization [data_bias_minimization]
#> ✖ Amount of data to be collected [data_amount]
#> ✖ Anyware [anyware]
#> ✖ Repositories [repositories]
#> ✖ Preprint server [preprint]
#> ✖ Miscellaneous methods details [misc_methods_details]
#>
#> ── Section: Analyses ──
#>
#> ✖ Missing data [missing_data]
#> ✖ Data validation [data_validation]
#> ✖ Analysis plan [analysis_plan]
#> ✖ Criteria for conclusions / inference criteria [criteria_for_conclusions]
#> ✖ Analyst masking [analyst_masking]
#> ✖ Miscellaneous analysis details [misc_analysis_details]