gtoxWriteData: Write screening data into the gtox databases

View source: R/gtoxWriteData.R

gtoxWriteDataR Documentation

Write screening data into the gtox databases

Description

gtoxWriteData takes a data.table with screening data and writes the data into the given level table in the gtox databases.

Usage

gtoxWriteData(dat, lvl, type)

Arguments

dat

data.table, the screening data to load

lvl

Integer of length 1, the data processing level

type

Character of length 1, the data type, "sc" or "mc"

Details

This function appends data onto the existing table. It also deletes all the data for any acids or aeids dat contains from the given and all downstream tables.

The data type can be either 'mc' for mutliple concentration data, or 'sc' for single concentration data. Multiple concentration data will be loaded into the level tables, whereas the single concentration will be loaded into the single tables.

Value

None

See Also

gtoxCascade, gtoxAppend

Examples


## Not run: 
## Load sample data
load(system.file("extdata", "data_for_vignette.rda", package="GladiaTOX"))

# Build assay table
assay <- buildAssayTab(plate, chnmap)

## Set study parameters
std.nm <- "SampleStudy" # study name
phs.nm <- "PhaseII" # study phase

## Load annotation in gtoxDB
loadAnnot(plate, assay, NULL)

## Get the created study ID
asid = gtoxLoadAsid(fld = c("asnm", "asph"), val = list(std.nm, phs.nm))$asid

## Prepare and load data
dat <- prepareDatForDB(asid, dat)
gtoxWriteData(dat[ , list(acid, waid, wllq, rval)], lvl = 0, type = "mc")

## End(Not run)


philipmorrisintl/GladiaTOX documentation built on Aug. 27, 2023, 9:07 p.m.