Learn R Programming

MethEvolSIM (version 0.2.1)

validate_dataAcrossTips: Validate Data Structure Across Tips

Description

This function ensures that data follows the required nested structure data[[tip]][[structure]], where:

  • data is a list of at least two tip elements.

  • Each tip is a list of structure elements.

  • Each structure contains a numeric vector of equal length across all tips.

Usage

validate_dataAcrossTips(data)

Arguments

data

A list structured as data[[tip]][[structure]].

Details

Throws errors if:

  • data is not a list.

  • It has fewer than two tips.

  • Any tip is not a list.

  • The number of structures is inconsistent across tips.

  • Any structure has zero-length data at any tip.

  • Structures have different site lengths across tips.