validate_data_cherryDist: Validate Structure of Input Data for Cherry Distance...

View source: R/summaryStatistics.R

validate_data_cherryDistR Documentation

Validate Structure of Input Data for Cherry Distance Computation

Description

This function checks whether the provided input data has the required structure. It ensures that the number of tips is sufficient and that the data structure is consistent across tips and structures.

Usage

validate_data_cherryDist(cherryDist, data)

Arguments

cherryDist

A data frame containing cherry pair distances, including tip indices (output from get_cherryDist)

data

A nested list representing structured data for each tip, following the format data[[tip]][[structure]].

Details

The function performs several validation steps:

  • Ensures that the number of tips in data is at least as large as the highest tip index in cherryDist.

  • Checks that all tips contain at least one structure and that the number of structures is consistent across tips.

  • Verifies that within each structure, all tips have the same number of sites and no zero-length structures.

If any of these conditions fail, the function throws an error with a descriptive message.


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