View source: R/interval_format_conversions.R
| int_detect_format | R Documentation |
Automatically detect the format of interval data.
int_detect_format(x)
x |
interval data in unknown format |
Detection rules:
RSDA: has class "symbolic_tbl" and contains complex columns
MM: data.frame with paired "_min" and "_max" columns
iGAP: data.frame with columns containing comma-separated values (e.g., "1.2,3.4")
ARRAY: a 3-dimensional array with dim[3] = 2 (min/max slices)
SODAS: character string ending with ".xml" (file path)
SDS: alias for SODAS
A character string indicating the detected format: "RSDA", "MM", "iGAP", "ARRAY", "SODAS", or "unknown"
data(mushroom.int)
int_detect_format(mushroom.int) # Should return "RSDA"
data(abalone.iGAP)
int_detect_format(abalone.iGAP) # Should return "iGAP"
# ARRAY format
x <- array(1:24, dim = c(4, 3, 2))
int_detect_format(x) # Should return "ARRAY"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.