validate_structureIndices: Validate Structure Indices for Island and Non-Island Data

View source: R/summaryStatistics.R

validate_structureIndicesR Documentation

Validate Structure Indices for Island and Non-Island Data

Description

This function checks whether the provided indices for islands and non-islands are within the valid range of structures in the dataset. It also warns if any indices are present in both index_islands and index_nonislands.

Usage

validate_structureIndices(data, index_islands, index_nonislands)

Arguments

data

A nested list data[[tip]][[structure]]. Assumes that the number of structures is consistent across tips and that within each structure, all tips have the same number of sites. The number of structures is inferred from length(data[[1]]).

index_islands

An integer vector specifying indices that correspond to island structures.

index_nonislands

An integer vector specifying indices that correspond to non-island structures.

Details

The funct@exportion performs the following checks:

  • Ensures that all indices in index_islands and index_nonislands are within the range of available structures.

  • Throws an error if any index is out of bounds.

  • Issues a warning if the same index appears in both index_islands and index_nonislands.

Value

No return value. The function stops execution if invalid indices are detected.


MethEvolSIM documentation built on April 12, 2025, 1:30 a.m.