is.costMatrix: Costmatrix class

View source: R/is.costMatrix.R

is.costMatrixR Documentation

Costmatrix class

Description

Functions to deal with the costmatrix class.

Usage

is.costMatrix(x)

Arguments

x

An object of class costMatrix.

Details

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

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

Value

is.costMatrix returns either TRUE or FALSE.

Author(s)

Graeme T. Lloyd graemetlloyd@gmail.com

Examples


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

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


graemetlloyd/Claddis documentation built on May 9, 2024, 8:07 a.m.