Package 'SENDsanitizer'

Title: Generate Synthetic SEND Data
Description: An R package that generate synthetic SEND data based on real SEND data.
Authors: Md Yousuf Ali [cre, aut], Susan Butler [aut], Kevin Snyder [aut], FDA [cph]
Maintainer: Md Yousuf Ali <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2025-03-02 06:20:39 UTC
Source: https://github.com/phuse-org/SENDsanitizer

Help Index


Compare real and synthetic data

Description

This is an shiny app that can be used to visually inspect real and synthetic data

Usage

compare_real_synthetic_shiny(root = NULL, root_synthetic = NULL)

Arguments

root

where real data

root_synthetic

where synthetic data located

Value

App

Examples

## Not run: 
compare_real_synthetic()

## End(Not run)

Function to generate synthetic SEND data

Description

This function generate synthetic SEND data from real SEND data.

Usage

sanitize(
  path,
  where_to_save = NULL,
  recovery = FALSE,
  number = 1,
  write_xpt = TRUE,
  setcd = NULL,
  test_original = FALSE,
  app = FALSE
)

Arguments

path

Mandatory
Path where real data/xpt files located, should be a directory that contains xpt files, one or multiple directory can be given.

where_to_save

mandatory
Where to save generated xpt files. Should be a directory.

recovery

optional
Whether recovery animal data should be generated. Default FALSE.
If FALSE, no recovery animal data will be generated.

number

mandatory, default 1
How many studies to generate. Currently only work with 1

write_xpt

mandatory, boolean
Should write the file or not. If TRUE, then xpt file will be created.
Default is TRUE.

setcd

optional, vector
If there are more than one control or Low dose or High dose, function will give an error. User can choose which setcd should use. If recovery FALSE, then only provide c('1','2','3','4') setcd like this. But if recovery is TRUE, then also add setcd for recovery group c('1','2','3','4','1R','2R','3R','4R')

test_original

mandatory, boolean
This will print dataset that have original(real) value and generated(synthetic) value. This is just comparison purpose. In RStudio IDE, you can see all the datasets and visually inspect.
default FALSE.

app

Mandatory, boolean
Only true if function is calling from shiny app. In that case, all generated synthetic data will be saved in list of dataframe. Default FALSE.

Examples

## Not run: 

# To generate one synthetic study dataset from one real study

SENDsanitizer::sanitize(path='path/to/directory/of/xpt/files/of/study/',
where_to_save='path/to/directory/where/generated/files/should/be/saved/')

# To generate one synthetic study dataset from multiple real studies

study_01 <- 'path/to/directory/of/xpt/files/of/study_01/'
study_02 <- 'path/to/directory/of/xpt/files/of/study_02/'
multiple_studies <- c(study_01,study_02)

SENDsanitizer::sanitize(path= multiple_studies,
where_to_save='path/to/directory/where/generated/files/should/be/saved/')


## End(Not run)