Learn R Programming

PatientProfiles (version 1.4.5)

variableTypes: Classify the variables between 5 types: "numeric", "categorical", "logical", "date", "integer", or NA.

Description

Classify the variables between 5 types: "numeric", "categorical", "logical", "date", "integer", or NA.

Usage

variableTypes(table)

Value

Tibble with the variables type and classification.

Arguments

table

Tibble.

Examples

Run this code
# \donttest{
library(PatientProfiles)
library(dplyr, warn.conflicts = TRUE)

x <- tibble(
  person_id = c(1, 2),
  start_date = as.Date(c("2020-05-02", "2021-11-19")),
  asthma = c(0, 1)
)

variableTypes(x)
# }

Run the code above in your browser using DataLab