isCat: Is the object categorical or continuous

Description Usage Arguments Details Value Examples

View source: R/OOP_util.R

Description

Checks if an object is categorical (or continuous). Currently accepts either a vector, presumably from a data frame, or a model object. In the case of the latter, it will check whether the model was built using categorical data.

Usage

1
2
3
isCat(x)

isCont(x)

Arguments

x

the object to test

Details

Note that it cannot be assume that if a model fails isCat it will pass isCont; both functions test for the conditions which it expects to hold, and there may be cases in which neither set of conditions is fully met.

Value

TRUE if the object is categorical/continuous, or is a model built on categorical/continuous data, FALSE otherwise

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
isCat(siteData$ecoType)
isCat(siteData$slope)
## Not run: 
isCat(model) 
## End(Not run)

isCont(siteData$ecoType)
isCont(siteData$slope)
## Not run: 
isCont(model) 
## End(Not run)

henkelstone/NPEL.Classification documentation built on May 17, 2019, 3:42 p.m.