R/vardis.R

Defines functions vardis

Documented in vardis

vardis<-function(data,varcat="numeric",plot.id,var,breaks,
                  include.lowest = FALSE, right = TRUE){
        index=c("numeric","character")
        varcat <- match.arg(varcat, index)
        plot.id=data[,plot.id]
        var=data[,var]
        if(varcat=="numeric"){
          vardis<-table(plot.id,cut(var,breaks = breaks,
                                          include.lowest = include.lowest, right = right))
        }
        else if(varcat=="character"){
          vardis<-table(plot.id,var)
        }
        return(vardis)
}

Try the forestHES package in your browser

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

forestHES documentation built on May 2, 2019, 7:31 a.m.