View source: R/interval_format_conversions.R
| int_convert_format | R Documentation |
Automatically detect the format of interval data and convert it to the target format.
int_convert_format(x, to = "MM", from = NULL, ...)
x |
interval data in one of the supported formats |
to |
target format: "MM", "iGAP", "RSDA", "ARRAY", "SODAS" (default: "MM") |
from |
source format (optional): "MM", "iGAP", "RSDA", "ARRAY", "SODAS". If NULL, will auto-detect. |
... |
additional parameters passed to specific conversion functions |
This function provides a unified interface for all interval format conversions. It automatically detects the source format (unless specified) and applies the appropriate conversion function.
Supported conversions:
RSDA ??? MM, iGAP, ARRAY
MM ??? iGAP, RSDA, ARRAY
iGAP ??? MM, RSDA, ARRAY
ARRAY ??? RSDA, MM, iGAP
SODAS ??? MM, iGAP, ARRAY
Interval data in the target format
Han-Ming Wu
int_detect_format int_list_conversions RSDA_to_MM RSDA_to_ARRAY MM_to_RSDA MM_to_ARRAY ARRAY_to_RSDA ARRAY_to_MM ARRAY_to_iGAP iGAP_to_MM iGAP_to_RSDA iGAP_to_ARRAY MM_to_iGAP
# Auto-detect and convert to MM
data(mushroom.int)
data_mm <- int_convert_format(mushroom.int, to = "MM")
# Explicitly specify source format
data(abalone.iGAP)
data_mm <- int_convert_format(abalone.iGAP, from = "iGAP", to = "MM")
# Convert MM to iGAP
data_igap <- int_convert_format(data_mm, to = "iGAP")
# Convert multiple datasets to MM
datasets <- list(mushroom.int, abalone.int, car.int)
mm_datasets <- lapply(datasets, int_convert_format, to = "MM")
# Check what conversions are available
int_list_conversions()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.