Introduction to dataSDA"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(warning = FALSE)
knitr::opts_chunk$set(message = FALSE)
knitr::opts_chunk$set(out.width = "100%")
knitr::opts_chunk$set(fig.align = 'center')
library(knitr)
library(dataSDA)
library(RSDA)

Example of Interval-Valued Data

Built-in Data

data(mushroom)
head(mushroom)

Set variable format

Changes the format of the set variables in the data to conform to the RSDA format.

mushroom.set <- set_variable_format(data = mushroom, location = 8, var = "Species")
head(mushroom.set)

RSDA format

Changes the format of the data to conform to RSDA format.

mushroom.tmp <- RSDA_format(data = mushroom.set, sym_type1 = c("I", "S"),
                            location = c(25, 31), sym_type2 = c("S", "I", "I"),
                            var = c("Species", "Stipe.Length_min", "Stipe.Thickness_min"))
head(mushroom.tmp)

Clean the column names

Clean up variable names to conform to the RSDA format.

mushroom.clean <- clean_colnames(data = mushroom.tmp)
head(mushroom.clean)

Write a symbolic data table from a CSV data file

write_csv_table(data = mushroom.clean, file = 'mushroom_interval.csv')

Read the symbolic data table and check the format

mushroom.int <- read.sym.table(file = 'mushroom_interval.csv', header = T, sep = ';', dec = '.', row.names = 1)
head(mushroom.int)

Example of iGAP format Data

Built-in Data

data(Abalone.iGAP)
head(Abalone.iGAP)

iGAP to MM

To convert iGAP files to CSV files.

Abalone <- iGAP_to_MM(Abalone.iGAP, c(1, 2, 3, 4, 5, 6, 7))
head(Abalone)


Try the dataSDA package in your browser

Any scripts or data that you put into this service are public.

dataSDA documentation built on July 9, 2023, 7:39 p.m.