RSDA Package version 2.0.8

Tutorial in SDA 2018 - Viana do Castelo

Oldemar Rodríguez R.

Installing the Package

#install.packages("RSDA",dependencies=TRUE)
library(RSDA)

Attaching package: 'RSDA'
The following objects are masked from 'package:stats':

    cor, cov, dist, sd, var
library(ggplot2)
# ?RSDA

How to read a Symbolic Table from a CSV file with RSDA?

setwd("~/Google Drive/MDCurso/Datos")
ex3 <- read.sym.table('tsym1.csv', header=TRUE, sep=';',dec='.', row.names=1)
ex3
# A Symbolic Data Table :  7  x  7 
        F1      F2  F3   F4        F5          F6      F7
Case1  2.8   [1,2] ▁▆▂    6     {a,d}      [0,90]  [9,24]
Case2  1.4   [3,9] ▅▂▁    8   {b,c,d}    [-90,98]  [-9,9]
Case3  3.2  [-1,4] ▂▂▅   -7     {a,b}     [65,90] [65,70]
Case4 -2.1   [0,2] ▇▁▁    0 {a,b,c,d}     [45,89] [25,67]
Case5   -3 [-4,-2] ▅▁▃ -9.5       {d}     [20,40]  [9,40]
Case6  0.1 [10,21] ▁▆▂   -1   {a,b,c}       [5,8]   [5,8]
Case7    9  [4,21] ▂▂▅  0.5     {a,d} [3.14,6.76]   [4,6]

How to save a Symbolic Table in a CSV file with RSDA?

setwd("~/Google Drive/MDCurso/Datos")
write.sym.table(ex3, file='tsymtemp.csv', sep=';',dec='.', row.names=TRUE,col.names=TRUE)

Symbolic Data Frame Example in RSDA

library(randomcoloR)
data(example3)
example3
# A Symbolic Data Table :  7  x  7 
        F1      F2                    F3   F4        F5          F6
Case1  2.8   [1,2] M1:10% M2:70% M3:20%     6 {e,g,i,k}      [0,90]
Case2  1.4   [3,9] M1:60% M2:30% M3:10%     8 {a,b,c,d}    [-90,98]
Case3  3.2  [-1,4] M1:20% M2:20% M3:60%    -7 {2,b,1,c}     [65,90]
Case4 -2.1   [0,2]  M1:90% M2:0% M3:10%     0 {a,3,4,c}     [45,89]
Case5   -3 [-4,-2]  M1:60% M2:0% M3:40%  -9.5 {e,g,i,k}     [20,40]
Case6  0.1 [10,21]  M1:0% M2:70% M3:30%    -1   {e,1,i}       [5,8]
Case7    9  [4,21] M1:20% M2:20% M3:60%   0.5   {e,a,2} [3.14,6.76]
           F7
Case1  [9,24]
Case2  [-9,9]
Case3 [65,70]
Case4 [25,67]
Case5  [9,40]
Case6   [5,8]
Case7   [4,6]
example3[2,]
# A Symbolic Data Table :  1  x  7 
       F1    F2                    F3 F4        F5       F6     F7
Case2 1.4 [3,9] M1:60% M2:30% M3:10%   8 {a,b,c,d} [-90,98] [-9,9]
example3[,3]
# A Symbolic Data Table :  7  x  1 
                         F3
Case1 M1:10% M2:70% M3:20% 
Case2 M1:60% M2:30% M3:10% 
Case3 M1:20% M2:20% M3:60% 
Case4  M1:90% M2:0% M3:10% 
Case5  M1:60% M2:0% M3:40% 
Case6  M1:0% M2:70% M3:30% 
Case7 M1:20% M2:20% M3:60% 
example3[2:3,5]
# A Symbolic Data Table :  2  x  1 
             F5
Case2 {a,b,c,d}
Case3 {2,b,1,c}
plot(example3)