vignettes/R/filterData.R

filterData <-
function(effect,Data){
#This function filters problematic columns from the analysis
#effect is column name that is being filtered
#' @export
#First, an already declared variable
ExcludeList<-c(.RSCABSEnv$GenderVar,.RSCABSEnv$GenerationVar,.RSCABSEnv$TreatmentVar,.RSCABSEnv$AgeVar,.RSCABSEnv$ReplicateVar)
if (length(which(ExcludeList==effect))>0){
return(FALSE)
}

Dvec<-convert2Score(Data[ ,effect])
#Second, any Response with nothing but zeros or too many scores
if (max(Dvec,na.rm=TRUE)<1 | max(Dvec,na.rm=TRUE)>8){
return(FALSE)
}

return(TRUE)

}

Try the RSCABS package in your browser

Any scripts or data that you put into this service are public.

RSCABS documentation built on May 1, 2020, 9:06 a.m.