validate_stats_dm {dRiftDM} | R Documentation |
Validate a stats_dm Object
Description
validate_stats_dm
is an internal (i.e., not exported) generic function to
ensure that stats_dm
objects, as well as their specific subclasses
(cafs
, quantiles
, delta_funs
, sum_dist
, and fit_stats
), meet the
necessary structural and column requirements. Each method performs
class-specific validation checks.
Usage
validate_stats_dm(stat_df)
## S3 method for class 'cafs'
validate_stats_dm(stat_df)
## S3 method for class 'quantiles'
validate_stats_dm(stat_df)
## S3 method for class 'delta_funs'
validate_stats_dm(stat_df)
## S3 method for class 'sum_dist'
validate_stats_dm(stat_df)
## S3 method for class 'fit_stats'
validate_stats_dm(stat_df)
## S3 method for class 'stats_dm'
validate_stats_dm(stat_df)
Arguments
stat_df |
A |
Details
The validation process checks for required columns and structure based on the
class of stat_df
. Each class has specific requirements:
-
validate_stats_dm.stats_dm
: Ensuresstat_df
is adata.frame
. -
validate_stats_dm.cafs
: Checks for the presence of"Bin"
,"Cond"
, and exactly one column prefixed with"P_"
-
validate_stats_dm.quantiles
: Requires"Prob"
,"Cond"
, and exactly two columns prefixed with"Quant_"
-
validate_stats_dm.delta_funs
: Ensures"Prob"
exists, at least two columns prefixed with"Quant_"
, and at least one column eachAvg_
andDelta_
-
validate_stats_dm.sum_dist
: Checks for a"Source"
column. -
validate_stats_dm.fit_stats
: Checks for"Log_Like"
,"AIC"
, and"BIC"
columns.
Value
Returns the unmodified stat_df
for convenience.