"validMBgibbsPars" <- function(object) { if(is.null(object@chains) || is.na(object@chains) || (object@chains<=0) || (object@chains!=as.integer(object@chains))) paste("Number of chains must be a positive integer",sep="") else if(!(object@KLrepeat%in% c("n","b","s"))) paste("@KLrepeat can only be \"n\"one, \"b\"urn, or \"s\"amp",sep="") else if((object@KLrepeat!="n") && (is.null(object@thresh) || is.na(object@thresh) || (object@thresh<0))) paste("Threshold must be defined correctly if KL-divergence check is done",sep="") else if(!length(object@burn) || !is.numeric(unlist(object@burn)) || any(is.null(unlist(object@burn))) || any(is.na(unlist(object@burn))) || any(unlist(object@burn)<0) || any(as.integer(unlist(object@burn))!=unlist(object@burn))) paste("Burn-in iterations must exist and all be integers >= 0",sep="") else if(any(is.null(as.numeric(names(object@burn)))) || any(is.na(as.numeric(names(object@burn)))) || any(as.numeric(names(object@burn))<=0)) paste("Burn-in temperatures must exist and all be integers > 0",sep="") else if(!length(object@slice) || !is.numeric(unlist(object@slice)) || any(is.null(unlist(object@slice))) || any(is.na(unlist(object@slice))) || any(unlist(object@slice)<0) || any(as.integer(unlist(object@slice))!=unlist(object@slice))) paste("Slicing iterations must exist and all be integers >= 0",sep="") else if(any(is.null(as.numeric(names(object@slice)))) || any(is.na(as.numeric(names(object@slice)))) || any(as.numeric(names(object@slice))<=0)) paste("Slicing temperatures must exist and all be integers > 0",sep="") else if(!length(object@samp) || !is.numeric(unlist(object@samp)) || any(is.null(unlist(object@samp))) || any(is.na(unlist(object@samp))) || any(unlist(object@samp)<0) || any(as.integer(unlist(object@samp))!=unlist(object@samp))) paste("Sampling iterations must exist and all be integers >= 0",sep="") else if(any(is.null(as.numeric(names(object@samp)))) || any(is.na(as.numeric(names(object@samp)))) || any(as.numeric(names(object@samp))<=0)) paste("Sampling temperatures must exist and all be integers > 0",sep="") else if(!(object@method %in% c("b","d"))) paste("Method ",object@method," not supported. Must be one of (\"b\"oltzmann, \"d\"elta)",sep="") else TRUE }