View source: R/interval_format_conversions.R
| to_all_interval_formats | R Documentation |
Convert interval data from any recognized format to all six supported interval data formats and return the results as a named list. This is useful for inspecting and comparing how the same interval data is represented across different formats.
to_all_interval_formats(x, ...)
x |
Interval data in one of the supported formats:
|
... |
Additional arguments passed to conversion functions (e.g.,
|
Six interval data formats are supported in this package. Each format stores the same information – lower and upper bounds for every variable of every observation – but differs in its structure and origin:
A symbolic_tbl object (class
c("symbolic_tbl", "tbl_df", "tbl", "data.frame")) where each
interval variable is a complex column (symbolic_interval):
Re() gives the minimum and Im() gives the maximum.
This is the native format of the RSDA package
(Billard & Diday, 2006; Rodriguez, 2024).
A plain data.frame where each interval variable is represented by
two numeric columns named <var>_min and <var>_max.
This is a widely used general-purpose representation.
A data.frame where each interval variable is stored as a character
column with comma-separated values "min,max".
This is the format used by the iGAP software (Correia, 2009).
A three-dimensional numeric array of size [n, p, 2].
The first slice [,,1] contains all minima and the second slice
[,,2] contains all maxima. Dimnames encode observation labels,
variable names, and c("min", "max"). This format is convenient
for matrix-based computations.
An XML file on disk produced by the SODAS software (Diday & Noirhomme,
2008). In R, SODAS data is referenced by its file path and read via
RSDA::SODAS.to.RSDA(). Since SODAS is a file-based format, it
cannot be generated from in-memory data.
An alias for SODAS. Both refer to the same XML-based format.
A named list with six slots:
RSDAA symbolic_tbl with complex-encoded
symbolic_interval columns.
MMA data.frame with paired _min/_max
columns.
iGAPA data.frame with comma-separated
"min,max" character values.
ARRAYA three-dimensional numeric array of dimension
[n, p, 2] where [,,1] stores minima and [,,2]
stores maxima.
SODASNULL unless the input is a SODAS XML file path,
in which case it stores the original path.
SDSNULL unless the input is a SODAS/SDS XML file path
(alias for SODAS).
Han-Ming Wu
Billard, L. and Diday, E. (2006). Symbolic Data Analysis: Conceptual Statistics and Data Mining. Wiley.
Rodriguez, O. (2024). RSDA: R to Symbolic Data Analysis. R package, https://CRAN.R-project.org/package=RSDA.
Correia, M. (2009). Interval GARCH and Aggregation of Predictions.
Diday, E. and Noirhomme-Fraiture, M. (2008). Symbolic Data Analysis and the SODAS Software. Wiley.
int_detect_format, int_convert_format,
int_list_conversions
data(car.int)
result <- to_all_interval_formats(car.int)
names(result)
# RSDA format (symbolic_tbl)
result$RSDA
# MM format (data.frame with _min/_max columns)
head(result$MM)
# iGAP format (data.frame with comma-separated values)
head(result$iGAP)
# ARRAY format (3D array)
dim(result$ARRAY)
result$ARRAY[1:3, , 1] # minima
result$ARRAY[1:3, , 2] # maxima
# SODAS/SDS slots are NULL (file-based format)
result$SODAS
result$SDS
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.