Description Usage Arguments Details Value Examples
View source: R/EndpointSummaryStats.R
In most Pheno-Evo experiments you will want to store the values of traits, such as degrade rate, for every cell in the population at every timepoint; however, in many cases it can be helpful to analyze just the population means of those traits. This function calculates mean values of the traits you ask it to, and appends those means to your existing endpoint dataframe.
1 | summarize.endpoint(ends.df, traitlist)
|
ends.df |
Dataframe of endpoint data, generated by extract.endpoint(). |
traitlist |
A vector of the names of the variables for which means should be calculated; names should match the corresponding column names, and each should be enclosed in quotation marks. |
Dataframes from timepoints other than the endpoint are also fine, as long as there is only 1 row per run number.
A new dataframe consisting of the original input dataframe with appended columns, one for each trait averaged.
1 2 3 4 | data(PhenoEvoData_small)
PE.ends_small<-extract.endpoint(PhenoEvoData_small, c(2, 4, 6))
pop.level.traits<-c('degrade.rate','switch.rate','response.error','generation')
PE.ends_small<-summarize.endpoint(PE.ends_small, pop.level.traits)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.