R/crosstabanalysis.R

Defines functions `crosstabanalysis`

`crosstabanalysis` <-
function(x,variable,factor){
    cross <- table(x[,variable]>0,x[,factor])
    result <- chisq.test(cross) 
    return(result)
}

Try the BiodiversityR package in your browser

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

BiodiversityR documentation built on Jan. 6, 2023, 5:18 p.m.