gaze_sub {autoReg}R Documentation

Summary function for categorical/continuous variable

Description

Summary function for categorical/continuous variable

Usage

gaze_sub(data, xname, y = NULL, max.ylev = 5, autoCat = FALSE, ...)

Arguments

data

A data.frame

xname

A name of categorical/continuous vector

y

A name of vector, either continuous or categorical

max.ylev

max.ylev An integer indicating the maximum number of levels of grouping variable ('y'). If a column have unique values less than max.ylev it is treated as a categorical variable. Default value is 5.

autoCat

logical Whether or not use is.mynumeric() to determine whether a variable is numeric or not

...

Further arguments to be passed to gazeCont() or gazeCat()

Value

An object of class "data.frame" or "tibble"

Examples

require(moonBook)
gaze_sub(acs,"age")
gaze_sub(acs,"log(age)")
gaze_sub(acs,"I(age^2)")
gaze_sub(acs,"sex")
gaze_sub(acs,"age","EF")
gaze_sub(acs,"sex","EF")
gaze_sub(acs,"age","Dx")
gaze_sub(acs,"sex","Dx")
gaze_sub(iris,"Species","Sepal.Length")
gaze_sub(mtcars,"am")
gaze_sub(mtcars,"am",autoCat=TRUE)

[Package autoReg version 0.3.3 Index]