Checks class and structure of MCMC objects.
chk_mcmcarray
checks if mcmcarray-object() object using
is.array(x) && is.numeric(x)
chk_mcmcr
checks if an mcmcr-object().
chk_mcmcrs
checks if an mcmcrs-object().
Details
To just check class use chk::chk_s3_class().
Functions
chk_mcmcarray(): Check mcmcarray Objectchk_mcmcr(): Check mcmcr Objectchk_mcmcrs(): Check mcmcrs Object
Examples
# chk_mcmcarray
try(chk_mcmcarray(1))
#> Error in chk_mcmcarray(1) : `1` must inherit from S3 class 'mcmcarray'.
# chk_mcmcr
chk_mcmcr(as.mcmcr(list(x = 1)))
try(chk_mcmcr(1))
#> Error in chk_mcmcr(1) : `1` must inherit from S3 class 'mcmcr'.
# chk_mcmcrs
chk_mcmcrs(as.mcmcrs(as.mcmcr(list(x = 1))))
try(chk_mcmcrs(1))
#> Error in chk_mcmcrs(1) : `1` must inherit from S3 class 'mcmcrs'.
