Learn R Programming

BioGeoBEARS (version 0.2.1)

parse_lagrange_output: Parse the output file from python LAGRANGE

Description

Parse the output of a C++ LAGRANGE run.

Usage

parse_lagrange_output(outfn, outputfiles = FALSE, results_dir = getwd(), new_splits_fn = FALSE, new_states_fn = TRUE, filecount = 0)

Arguments

outfn
The C++ LAGRANGE output text file.
outputfiles
Should parsed output be written to files? Default FALSE.
results_dir
The directory outfn is in.
new_splits_fn
Should a text file containing a table of the splits and their probabilities be output? Default FALSE.
new_states_fn
Should a text file containing a table of the states and their probabilities be output? Default TRUE, unlike python LAGRANGE, C++ LAGRANGE will output the states at the nodes.
filecount
The starting number for the filecount (relevant if one is processing many files).

Value

sumstats A data.frame containing the summary statistics (LnL, d and e rates, etc.) The splits filename is output to screen.

Details

This function parses the output of LAGRANGE, obtained by a command such as the following, run at a UNIX/Mac Terminal command line.

cd /Users/nick/Desktop/__projects/_2011-07-15_Hannah_spider_fossils/_data/lagrange_for_nick

./lagrange_cpp palp_no_Lacun_v1_2nd387.lg > lagrange_results_v1_2nd387.txt

C++ LAGRANGE can be obtained at https://code.google.com/p/lagrange/

References

https://code.google.com/p/lagrange/

Matzke_2012_IBS

ReeSmith2008

See Also

get_lagrange_nodenums, LGpy_splits_fn_to_table

Examples

Run this code
test=1

Run the code above in your browser using DataLab