Skip to content

Utility functions for the Clinical Pharmacology and Pharmacometrics business unit of Simulations Plus, Inc

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

simulations-plus/utilscognigen

Repository files navigation

utilscognigen

Overview

utilscognigen provides utility functions for R and RStudio at the Clinical Pharmacology and Pharmacometrics (CPP) business unit of Simulations Plus, Inc. This package facilitates creation, execution, and review of R files. This package also provides an interface for interacting with the CPP file system and sponsor directory structure.

Load it with:

library(utilscognigen)

Functionality

Creating R Files

  • Create, update, and open R files with QMS approved headers with Redit() and Rcopy().
  • Information can be retrieved from existing headers using the get_header_* family of functions.

Executing R Files

  • Execute R scripts with rcb(). This will produce a log file (.Rout).
  • Render R Markdown with render(). This produces an R script to render the Rmd file, which also results in an associated .Rout file.

Recording Input and Output Files

  • record_input() and record_output() store IO information in a dedicated environment.
  • Summarize the collected IO information with recorded_io().

Reviewing R and Rout Files

  • Review warnings and errors with scanlogs(), which is run automatically after rcb() and render().
  • Review recorded input and output files of an executed R file with get_recorded_io().
  • Check if an R file meets CPP standards with check_standards().
  • Review the entire .Rout file (as well as other logfiles) with logfile().

Interacting with the CPP File System

  • Many functions require a path argument in this package. Generally, the open file in RStudio will be used when no other path is provided. See get_source_file().
  • Convert file paths between their Unix and Windows representations with path_to_unix() and path_to_windows().
    • Also see the Toggle File Path Selection RStudio Addin.
  • Navigate Outlook and SharePoint project resources with browse_project_email() and browse_project_sharepoint().
  • Build file paths based on CPP's file system and directory structure with path_sponsor(), path_drug(), and path_project().
  • Interact with the CPP shared-code repository and quickly identify and copy files with browse_shared_code(), list_files_shared_code(), and Rcopy_shared_code().
  • Copy snippets (including shared-code snippets) with set_rstudio_snippets().
  • Interact with CPP's zfs snapshots with file_snapshots(), diff_snapshot(), and restore_snapshot().

About

Utility functions for the Clinical Pharmacology and Pharmacometrics business unit of Simulations Plus, Inc

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks