Learn R Programming

dataSDA (version 0.1.8)

int_convert_format: Convert Interval Data Format

Description

Automatically detect the format of interval data and convert it to the target format.

Usage

int_convert_format(x, to = "MM", from = NULL, ...)

Value

Interval data in the target format

Arguments

x

interval data in one of the supported formats

to

target format: "MM", "iGAP", "RSDA", "SODAS" (default: "MM")

from

source format (optional): "MM", "iGAP", "RSDA", "SODAS". If NULL, will auto-detect.

...

additional parameters passed to specific conversion functions

Author

Han-Ming Wu

Details

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 (via RSDA_to_MM)

  • RSDA → iGAP (via RSDA_to_iGAP)

  • iGAP → MM (via iGAP_to_MM)

  • SODAS → MM (via SODAS_to_MM)

  • SODAS → iGAP (via SODAS_to_iGAP)

  • MM → iGAP (via MM_to_iGAP)

  • MM → RSDA (via MM_to_RSDA)

  • iGAP → RSDA (via iGAP_to_RSDA)

See Also

int_detect_format int_list_conversions RSDA_to_MM iGAP_to_MM MM_to_iGAP MM_to_RSDA iGAP_to_RSDA

Examples

Run this code
# 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()

Run the code above in your browser using DataLab