-
Data type assessment
+These are more overall than the native typeof. This is used to assess a more +meaningful "clinical" data type.
@@ -96,6 +99,15 @@
#> $carb
#> [1] "categorical"
#>
+mtcars |>
+ default_parsing() |>
+ data_type()
+#> mpg cyl disp hp drat
+#> "continuous" "categorical" "continuous" "continuous" "continuous"
+#> wt qsec vs am gear
+#> "continuous" "continuous" "dichotomous" "dichotomous" "categorical"
+#> carb
+#> "categorical"
c(1, 2) |> data_type()
#> [1] "dichotomous"
1 |> data_type()
@@ -106,6 +118,8 @@
#> [1] "continuous"
factor(letters[1:20]) |> data_type()
#> [1] "categorical"
+as.Date(1:20) |> data_type()
+#> [1] "datetime"