Description Usage Arguments Details Value Examples
View source: R/datacollation.R
Filter a data frame by Generation or NumCells
1 2 | filter_by_generation_or_numcells(df, path, generation = NA,
numcells = NA, num_parameters = NA)
|
df |
data frame |
path |
folder containing output.dat (needed for numcells only) |
generation |
Generation at which to filter (default NA corresponds to no filtering) |
numcells |
Number of cells at which to filter (default NA corresponds to no filtering) |
num_parameters |
Number of parameters, accounting for the first set of columns in the dataframe; required if df represents multiple simulations |
If both generation
and numcells
are provided then numcells
takes precedent. If numcells
is provided and df
lacks a NumCells
column then a NumCells
column will be added (using the output.dat
file
in the folder specified by path
), unless df
contains multiple seed
values, in which case an error will result.
the combined dataframe
1 2 3 4 5 | df <- read_delim_special(system.file("extdata", "output_allele_counts.dat",
package = "demonanalysis", mustWork = TRUE))
filter_by_generation_or_numcells(df, NA, generation = 10, numcells = NA)
my_path <- system.file("extdata", package = "demonanalysis", mustWork = TRUE)
filter_by_generation_or_numcells(df, my_path, generation = NA, numcells = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.