Learn R Programming

bioassays (version 1.0.1)

reduceblank: Reduce Blank Values

Description

This function can reduce 'blank' value from readings. Can handle separate blanks for separate groups in the dataframe.

Usage

reduceblank(dataframe, x_vector, blank_vector, y)

Arguments

dataframe

Data in the form of dataframe

x_vector

A character vector of groups/entries for which the blank has to be reduced.

blank_vector

A character vector of blank names whose value has to be reduced.

y

Name of the column (column should be numeric in nature) whose values has be reduced.

Value

A dataframe with a new column 'blankminus' (result of the blankminus function) added to the right.

Details

This function will reduce the first blank vector element from first x_vector element and so on.

Examples

Run this code
# NOT RUN {
## loading data
data(metafile384, rawdata384)
rawdata<-plate2df(data2plateformat(rawdata384,platetype = 384))
data_DF2<- dplyr::inner_join(rawdata,metafile384,by=c("row","col","position"))

## eg:1 reduce blanks of data_DF2.
# reduce seperate blanks (mean of blank wells) for drug1, drug2, drug3 and drug4.
#blanks are blank1, blank2, blank3 and blank4 respectively for different drug.

data_blk<-reduceblank(data_DF2,
         x_vector=c("drug1","drug2","drug3","drug4"),
         blank_vector = c("blank1","blank2","blank3","blank4"),
         "value")

# }

Run the code above in your browser using DataLab