prepareDatForDB: Assign default processing methods

Description Usage Arguments Details Value Examples

View source: R/prepareDatForDB.R

Description

This function is a wrapper to ease the creation of the dataframe containing data and metadata to be loaded in the database

Usage

1
prepareDatForDB(asid, dat)

Arguments

asid

Integer, the asid value(s) to assign the default methods to

dat

Data.table containing metadata and data to load in DB

Details

This function formats a dat table to be loaded in DB

Value

Data table with data and metadata to store in database

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## 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

## Delete previously loaded study data
asid = gtoxLoadAsid(fld=c("asnm", "asph"), val=list(std.nm, phs.nm))$asid
if(length(asid)>0){ deleteStudy(asid=asid) }

## 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)

## End(Not run)

GladiaTOX documentation built on Nov. 15, 2020, 2:07 a.m.