# \donttest{
library(Hmisc)
desc <- describe(mtcars)
htype(desc[["vs"]]) # "cat"
htype(desc[["mpg"]]) # "con"
htype(desc[["cyl"]]) # "none"
# }
# \donttest{
htypes(desc) # c(
# mpg = "con", cyl = "none", disp = "con",
# hp = "con", drat = "con", wt = "con", qsec = "con",
# vs = "cat", am = "cat", gear = "none",
# carb = "none"
# )
# }
# \donttest{
htypes(mtcars) # htypes(desc)
htypes(letters) # "none"
# }
# \donttest{
is_hcat(desc[["vs"]]) # TRUE
is_hcat(desc[["mpg"]]) # FALSE
# }
# \donttest{
is_hcon(desc[["vs"]]) # FALSE
is_hcon(desc[["mpg"]]) # TRUE
# }
Run the code above in your browser using DataLab