The rqualify package consists of 2 functions and R
Markdown files:
-
rqualify: Orchestrates the qualification process. -
R-validation.Rmd: An R Markdown file that defines the structure and content of the PDF report.
rqualify()
The rqualify function is the main function of the
package, which orchestrates the entire qualification process. It
performs the following steps sequentially:
- Normalizes the folder path provided in
path_save. - Checks for the existence of the
testsfolder 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. - (Optional) Installs TinyTeX and adds it to the system path. In this
step, the TinyTeX LaTeX bundle and the
grfextLaTeX package are installed to ensure that the PDF report can be generated without errors. - (Optional) Installs Pandoc if not available and installs it.
- Copies the
Rmdfile to theR-validationfolder created. - Renders the
Rmdfile to LaTeX, which executes the IQ and OQ checks defined in the R Markdown file. - 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.
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").
