Description Usage Arguments Value Examples
View source: R/datacollation.R
Add relative time column to a dataframe, and diversity at the new time zero
1 | add_relative_time(df, start_size, num_parameters)
|
df |
dataframe with columns including "Generation", "NumCells" and "DriverEdgeDiversity" |
start_size |
value of NumCells at which new_time should be set to zero |
num_parameters |
number of parameters, accounting for the first set of columns in the dataframe |
the same dataframe with additional columns: "new_time" is the time elapsed since NumCells = start_size; "div0" is DriverDiversity when NumCells = start_size; "rank_div0" is div0 rescaled to a rank between 0 and 1
1 2 3 4 | num_parameters = count_parameters(system.file("extdata", "",
package = "demonanalysis", mustWork = TRUE))
comb_df <- combine_dfs(system.file("extdata", "", package = "demonanalysis", mustWork = TRUE))
add_relative_time(comb_df, start_size = 100, num_parameters = num_parameters)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.