Skip to contents

The package provides the rqualify() entry point and two report templates backed by shared execution and result-checking helpers:

  1. rqualify: Orchestrates the qualification process.
  2. R-validation.Rmd and R-validation.qmd: LaTeX and Quarto/Typst report templates.

rqualify()

The rqualify function is the main function of the package, which orchestrates the entire qualification process. It performs the following steps sequentially:

  1. Normalizes the folder path provided in path_save.
  2. Checks for the existence of the tests folder in the R installation path. If the folder does not exist, an error is thrown, and the function stops execution. This check ensures that the R installation is complete and includes the necessary components for testing.
  3. (Optional) Installs TinyTeX and adds it to the system path. In this step, the TinyTeX LaTeX bundle and the grfext LaTeX package are installed to ensure that the PDF report can be generated without errors.
  4. (Optional) Installs Pandoc if not available and installs it.
  5. Copies the Rmd file to the R-validation folder created.
  6. Renders the Rmd file to LaTeX, which executes the IQ and OQ checks defined in the R Markdown file.
  7. Renders the LaTeX to a PDF report.

For step 2 to be successful with R-validaion.Rmd, R must be installed with the tests folder. This is default behavior in Windows, but may not be the case in Linux or macOS. If you are running on Linux and encounter an error at this step, please refer to the instructions provided in the R Installation and Administration manual (https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Testing-a-Unix_002dalike-Installation) to install R with the tests folder.

During step 3, the installation of TinyTeX, the process may be slow and appear to hang. This is not unexpected behavior, and the function will only proceed to the next step once the installation is complete.

We have also received reports from macOS users that a permissions popup may appear prompting users to approve installation. This may occur during the stage of installing TinyTeX or Pandoc. If you encounter this popup, please approve the installation to allow the process to continue. If you do not approve the installation, the process will not be able to proceed and will likely result in an error.

Quarto skips TinyTeX and standalone Pandoc setup. Existing rendering tools are reused. Prerequisites are checked before output directories are created, so a missing tool does not prevent retrying at the same destination.

Set details = TRUE to receive a structured result containing overall status, per-suite results, report paths, timestamps, and R/tool versions. The result is also saved as validation_result.rds. The default return remains the output directory path.

For additional details on inputs and outputs of the rqualify function, please refer to the function documentation ?rqualify.

Rvalidation.Rmd

The Rvalidation.Rmd file is an R Markdown file that defines the structure and content of the PDF report generated by the rqualify function. It includes sections for both Installation Qualification (IQ) and Operational Qualification (OQ), as well as a summary table of the checks performed and their outcomes. The file uses R code chunks to execute the necessary checks and capture any errors that occur during the process. The results of the checks are displayed in the PDF report, along with any error messages encountered during execution.

The structure of Rvalidation.Rmd closely follows R-IQ-OQ, which is written R/Sweave. The R code chunks in Rvalidation.Rmd are adapted from the R-IQ-OQ code, with modifications to fit the structure of an R Markdown file and to capture errors for display in the PDF report.

For additional details and to see an example of a successful qualification, see vignette("details").

Rvalidation.qmd

The Rvalidation.qmd file is a Quarto file that follows the same structures as Rvalidation.Rmd. It is used to generate a PDF report using Quarto instead of R Markdown. The file includes the same sections for Installation Qualification (IQ) and Operational Qualification (OQ), as well as a summary table of the checks performed and their outcomes. The R code chunks in Rvalidation.qmd are adapted from the R-IQ-OQ code, with modifications to fit the structure of a Quarto file.