View source: R/detect_pair_type.R
detect_pair_type | R Documentation |
Detect the type of a pair of variabes.
detect_pair_type(x, y)
x |
A vector. |
y |
A vector. |
A character vector of length 1. Values can be '2dummies','2num', '2fac','num_dummy' or 'num_fac'.
detect_pair_type(as.factor(mtcars$carb),as.factor(mtcars$cyl)) # '2fac'
detect_pair_type(mtcars$am, mtcars$vs) # '2dummies
detect_pair_type(mtcars$mpg, mtcars$disp) # '2num'
detect_pair_type(mtcars$mpg, mtcars$vs) # 'num_dummy'
detect_pair_type(mtcars$mpg, as.factor(mtcars$cyl)) # 'num_fac'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.