R/ChiPValue.R

Defines functions ChiPValue

ChiPValue <- function(data, x, y){

	
options(warn=-1)
chi <- data %>%
	summarise(p_value =if (sum(x <= 0) < 1) {
		chisq.test(x, p = !!sym(y), rescale.p = T)$p.value
	} else {
		"---"
	})
options(warn=0)
chi <- cbind(`Chi-Test` = "Chi-Test:   p value", chi)
return(chi)
}
irisweyermenkhoff/toyota-idv-functions documentation built on March 4, 2020, 9:57 a.m.