View source: R/SelectionStrength.R
clock_reshape | R Documentation |
Converts clock rate tables, such as those produced by clockrate_summary
and imported back after including clade names, from wide to long format.
clock_reshape(rate_table)
rate_table |
A data frame of clock rates, such as from the output of |
This function will convert clock rate tables from wide to long format, with a new column "clock" containing the clock partition from where each rate estimate was obtained as a factor. The long format is necessary for downstream analyses of selection strength (mode), as similarly done by FBD_reshape
for posterior parameter log files.
A data frame containing a single "value" column (for all rate values) and one column for the "clock" variable (indicating to which clock partition each rate values refers to)
vignette("rates-selection")
for the use of this function as part of an analysis pipeline.
get_clockrate_table_MrBayes
, summary
, clockrate_summary
, FBD_reshape
# See vignette("rates-selection") for how to use this # function as part of an analysis pipeline ## The example dataset rate_table_clades_means3 ## has clades and 3 clock rate columns: data("rate_table_clades_means3") ## Reshape a clock rate table with clade names to long format ## Not run: rates_by_clade <- clock_reshape(rate_table_clades_means3) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.