read_collected_nltt_stats: Read all the collected nLTT statistics of all simulations

Description Usage Arguments Value Author(s) Examples

Description

Read all the collected nLTT statistics of all simulations

Usage

1
2
  read_collected_nltt_stats(filename = find_path("collect_files_nltt_stats.csv"),
  burn_in_fraction)

Arguments

filename

the name of the CSV containing the collected nLTT statistics. Default value is 'inst/extdata/collected_files_nltt_stats.csv'

burn_in_fraction

fraction of posterior states being discarded, where 0.0 keeps the full posterior, 0.1 (a commonly used value) discards the first 10 percent

Value

a dataframe, with columns 'filename' (name of the file), 'sti' (species tree index), 'ai' (alignment index), 'pi' (posterior index), 'si' (state index) and 'nltt_stat' (the nLTT statistic between that posteriors's state and the nLTT of the original species tree (which is either 'youngest' for 'sti' equals 1, or 'oldest' for 'sti' equals 2)

Author(s)

Richel Bilderbeek

Examples

1
2
3
4
5
6
7
8
  df <- read_collected_nltt_stats(burn_in_fraction = 0.1)
  expected_names <- c("filename", "sti", "ai", "pi", "si", "nltt_stat")
  testit::assert(names(df) == expected_names)
  testit::assert(is.factor(df$filename))
  testit::assert(is.factor(df$sti))
  testit::assert(is.factor(df$ai))
  testit::assert(is.factor(df$pi))
  testit::assert(is.factor(df$si))

richelbilderbeek/wiritttea documentation built on May 27, 2019, 8:02 a.m.