Runs the repository modules on a folder of files on your own computer and
writes a single report. Use it on a repository you have downloaded (for
example with osf_file_download()) to see what was shared and what could be
improved, before archiving the files somewhere permanent.
Arguments
- path
path to the repository folder to check
- output_file
the name of the output file. Defaults to the folder's own name with
_report.htmlappended, written to the R session's temporary folder, which R removes when the session ends (CRAN does not allow writing elsewhere unless you ask for it). Give a path here to keep it; any folders in that path must already exist.- output_format
the format to create the report in,
"html"(the default) or"qmd"- report_type
"full"(the default),"brief"(only the modules that need attention),"simple"(a static, email-safe report with no embedded JavaScript),"simple_brief"(both) or"checklist"(every check sorted by its result, also static) – seereport()andreport_type().- modules
the modules to run. Defaults to the four repository modules, in the order they depend on each other. Change it to run fewer.
- args
a list of extra arguments to pass to modules, named by module (see
report()).local_pathandlocal_onlyare set for you.
Details
Four modules run in order, each building on the one before it:
repo_check takes an inventory of the files,
code_check reads the analysis scripts,
data_check reads the data files and runs data-quality checks,
and codebook_check checks whether the data columns are
documented. Only the first is told where the files are; the rest reuse its
results.
Nothing is downloaded and no links are followed: only the folder you name is
read. Whether a language model is used is decided by llm_use(), exactly as
when running the modules individually.
Examples
# \donttest{
# check the demo repository; the report goes to the temporary folder
res <- report_repository(demofile("repo"), output_format = "qmd",
modules = "repo_check")
#> The report is in the temporary folder, which R removes when it closes:
#> /tmp/RtmpNCKKS0/stroop_effect_paper_report.qmd
#> Give `output_file` to save it somewhere else.
attr(res, "save_path")
#> [1] "/tmp/RtmpNCKKS0/stroop_effect_paper_report.qmd"
# }
