R/pulseData.R
addKnownToFormulas.Rd
If, for example, a labelled fraction is estimated at several time points (0hr, 2hr, 4hr), corresponding partially evaluated formulas will be created. In this case, a time variable (e.g. "t") will be substituted by its values from the corresponding column in the conditions data.frame. Hence several partially evaluated formulas will be created for every combination of variable values described in the conditions data.frame.
addKnownToFormulas(formulas, formulaIndexes, conditions)
formulas | a named list with unevaluated expressions for expected levels in a given fraction (e.g. describing amounts of "labelled", "total" RNA etc.) |
---|---|
formulaIndexes | a list describing which formulas to use for mean read number calculation for fractions defined by the names of list items |
conditions | a data.frame with the first column corresponding to names in formulasIndexes (e.g. "total", "pull_down") |
a list with two items:
list of partially evaluated formulas
a vector of conditions generated from combination of columns
formulas <- MeanFormulas(total = m, label = m * exp(-d*t)) formulaIndexes <- list( total = 'total', pull_down = 'label' ) conditions <- data.frame( type = c('total', 'pull_down', 'pull_down'), t = c(0, 1, 5) ) result <- addKnownToFormulas(formulas, formulaIndexes, conditions) str(result)#> List of 2 #> $ formulas :List of 3 #> ..$ total.0: symbol m #> ..$ label.1: language m * exp(-d * 1) #> ..$ label.5: language m * exp(-d * 5) #> $ formulaIndexes:List of 3 #> ..$ total.0 : int 1 #> ..$ pull_down.1: int 2 #> ..$ pull_down.5: int 3