Learn R Programming

Claddis (version 0.7.0)

is.stateGraph: Stategraph class

Description

Functions to deal with the stategraph class.

Usage

is.stateGraph(x)

Value

is.stateGraph returns either TRUE or FALSE.

Arguments

x

An object of class stateGraph.

Author

Graeme T. Lloyd graemetlloyd@gmail.com

Details

Claddis uses various classes to define specific types of data, here the use of a character stategraph (to specify the parsimony costs of transitions between character states) are assigned the class "stateGraph".

is.stateGraph checks whether an object is or is not a valid stateGraph object.

Examples

Run this code

# Make an unordered costmatrix:
costmatrix <- make_costmatrix(
  min_state = 0,
  max_state = 2,
  character_type = "unordered"
)

# Convert costmatrix to stategraph:
stategraph <- convert_costmatrix_to_stategraph(costmatrix = costmatrix)

# Check that this is a valid costMatrix object:
is.stateGraph(x = stategraph)

Run the code above in your browser using DataLab