Rev Language Reference


readCharacterHistory - Function to read in character histories

Reads character histories (in `simmap` format) from a file and saves them in one vector object. The character states always should be 0-indexed.

Usage

readCharacterHistory(String file)

Arguments

file : String (pass by value)
The name of the file with the character history.

Return Type

Details

A file name must be provided as argument. `char_hist = readCharacterHistory(...)` returns a `CharacterHistory[]` object. `char_hist = readCharacterHistory(...)[i]` returns a `CharacterHistory` object.

Example

# read a character history
char_hist = readCharacterHistory("output/simmap.tree")