get_types | R Documentation |
Automatically determine types of each variable (continuous/binary/ternary/truncated) in a data matrix.
get_types(X, tru_prop = 0.05)
X |
A numeric data matrix (n by p), where n is number of samples, and p is number of variables. Missing values (NA) are allowed. |
tru_prop |
A scalar between 0 and 1 indicating the minimal proportion of zeros that should be present in a variable to be treated as |
get_types
returns
types: A vector of length p indicating the type of each of the p variables in X
. Each element is one of "con"
(continuous), "bin"
(binary), "ter"
(ternary) or "tru"
(truncated).
X = gen_data(types = c("ter", "con"))$X get_types(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.