Learn R Programming

coRNAi (version 1.22.0)

updateDf: updates dataframe after fitting of main estimates

Description

adds residuals (value-main effects) to a dataframe

Usage

updateDf(df, lm, per=NULL)

Arguments

df
df dataframe created by cellHTS2df function
lm
lm lm objects, residuals from fitting main effects to data
per
per string argument, for which factor the analysis was done separetly, eg. replicate.

Value

data frame with a new column "residuals"

Examples

Run this code
data(screen1_raw)
df = cellHTS2df(screen1_raw,neutral="Fluc")
df = weightDf(df,exclude=c("double","controlP1","controlP2","controlN1","controlN2","controlP1N1"))
lmain =lmmain(df)
df = updateDf(df,lmain)
hist(df$residuals)

Run the code above in your browser using DataLab