# Data type assessment — data_type • FreesearchR
Data type assessment

Skip to contents

# Data type assessment

Source: `R/regression_model.R`
`data_type.Rd`

Data type assessment

## Usage

    data_type(data)

## Arguments

data

  data

## Value

outcome type

## Examples

    mtcars |>
      default_parsing() |>
      lapply(data_type)
    #> $mpg
    #> [1] "continuous"
    #>
    #> $cyl
    #> [1] "categorical"
    #>
    #> $disp
    #> [1] "continuous"
    #>
    #> $hp
    #> [1] "continuous"
    #>
    #> $drat
    #> [1] "continuous"
    #>
    #> $wt
    #> [1] "continuous"
    #>
    #> $qsec
    #> [1] "continuous"
    #>
    #> $vs
    #> [1] "dichotomous"
    #>
    #> $am
    #> [1] "dichotomous"
    #>
    #> $gear
    #> [1] "categorical"
    #>
    #> $carb
    #> [1] "categorical"
    #>
    c(1, 2) |> data_type()
    #> [1] "dichotomous"
    1 |> data_type()
    #> [1] "monotone"
    c(rep(NA, 10)) |> data_type()
    #> [1] "empty"
    sample(1:100, 50) |> data_type()
    #> [1] "continuous"
    factor(letters[1:20]) |> data_type()
    #> [1] "categorical"