Clase 1

Punto 1 Cargar elementos (vectores)

y <- 4
x <- -5


z <- pi
z
## [1] 3.141593
d<- exp(4)

S <- (x+y+z)
S
## [1] 2.141593

Punto 2 Cargar funciones pre-establecidas

y1 <- pi
y1
## [1] 3.141593
z1 <- exp(4)
z1 
## [1] 54.59815

Punto 3 Matrices y medidas de tendencia central

x2 <- c(3, -5, 31, -1, -9, 10, 0, 18)
x2
## [1]  3 -5 31 -1 -9 10  0 18
y2 <- c(1, 1, -3, 1, -99, -10, 11, 7)
y2
## [1]   1   1  -3   1 -99 -10  11   7
m3 <- (x2+y2)
m3
## [1]    4   -4   28    0 -108    0   11   25
Media.de.m3 <-mean(m3)
median (m3)
## [1] 2
sd (m3)
## [1] 43.06805
var (m3)
## [1] 1854.857
cov(x2,y2)
## [1] 193.6607
cor(x2,y2)
## [1] 0.4072118
x2[2:7]
## [1] -5 31 -1 -9 10  0
y2[-c(2,4)]
## [1]   1  -3 -99 -10  11   7
y.menores.a.menos.3 <- y2 < -3
y.mayores.a.10 <- y2 > 10
t1<-y2[c(y.menores.a.menos.3)]
t2<-y2[c(y.mayores.a.10)]
t3<-c(t1,t2)
t3
## [1] -99 -10  11

Punto 4 Matrix, Dataframe, armado de base manual

A = matrix(c(1,2,3,4,5,6,7,8,9,10,11,12),nrow=4,"byrow"="true")

A[1,1:3] 
## [1] 1 2 3
#Es la primera fila de la Matríz A

A[1:4,2]
## [1]  2  5  8 11
#Es la segunda columna de la Matriz A

A[3,3] 
## [1] 9
#Es el elemento que resulta de la inersección de la fila 3, con la columna 3

A[11] 
## [1] 9
#Es el mismo elemento, pero contandolo desde la posición desde las columnas

matrix(1:20, nrow = 4, ncol = 5)
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    5    9   13   17
## [2,]    2    6   10   14   18
## [3,]    3    7   11   15   19
## [4,]    4    8   12   16   20
#El comando "matrix" permite establecer un orden de filas y columnas para los elementos

as.matrix(1:20, nrow = 4, ncol = 5)
##       [,1]
##  [1,]    1
##  [2,]    2
##  [3,]    3
##  [4,]    4
##  [5,]    5
##  [6,]    6
##  [7,]    7
##  [8,]    8
##  [9,]    9
## [10,]   10
## [11,]   11
## [12,]   12
## [13,]   13
## [14,]   14
## [15,]   15
## [16,]   16
## [17,]   17
## [18,]   18
## [19,]   19
## [20,]   20
#El comando "as.matrix" no permite establecer filas y columnas, sino que lista los elementos en una unica fila

datos <- as.data.frame(matrix(1:20, nrow = 4, ncol = 5))
datos
##   V1 V2 V3 V4 V5
## 1  1  5  9 13 17
## 2  2  6 10 14 18
## 3  3  7 11 15 19
## 4  4  8 12 16 20
#El comando as.data.frame permite identificar las columnas como variables y las filas como casos.

Punto 5 Armado de una base manual

educacion <- factor(c("Lic","Bach","Bach","Bach", "Dr", "MSc"),
               levels = c("Lic","Bach","Dr", "MSc"))

datos <- data.frame( Peso = c(76, 67, 55, 57, 87, 48), Edad = c(25, 23, 19, 18, 57, 13), Nivel.Educativo = educacion)
datos
##   Peso Edad Nivel.Educativo
## 1   76   25             Lic
## 2   67   23            Bach
## 3   55   19            Bach
## 4   57   18            Bach
## 5   87   57              Dr
## 6   48   13             MSc

Punto 6 Cargando datos de un CSV

setwd("C:/Users/Acer/Desktop/EP_R")

#Directorio donde se alojan los datos

datos1 <- read.csv('EjemploAlgoritmosRecomendacion.csv', header=TRUE, sep=';',dec=',')
datos1
##          Nombre VelocidadEntrega Precio Durabilidad ImagenProducto
## 1          Adam             2.05   0.30        3.45           2.35
## 2          Anna             0.90   1.50        3.15           3.30
## 3       Bernard             1.70   2.60        2.85           3.00
## 4        Edward             1.35   0.50        3.55           2.95
## 5        Emilia             3.00   0.45        4.80           3.90
## 6        Fabian             0.95   1.65        3.95           2.40
## 7        Philip             2.30   1.20        4.75           3.30
## 8         Frank             0.65   2.10        3.10           2.55
## 9        Xavier             2.75   0.80        4.70           2.35
## 10      Gabriel             2.00   1.75        3.25           3.00
## 11      Marisol             1.20   0.80        4.40           2.40
## 12        Henry             1.95   1.10        4.55           2.30
## 13        Irene             1.40   0.70        4.05           1.90
## 14     Isabelle             1.85   0.75        4.30           2.85
## 15      Isidore             2.35   0.65        4.95           3.35
## 16       Joseph             1.70   1.00        4.85           2.35
## 17       Eugene             1.60   2.05        2.85           2.55
## 18      Eugenia             2.45   0.90        3.85           2.15
## 19       Eunice             2.65   0.70        4.85           3.05
## 20          Eva             2.35   0.65        4.95           3.35
## 21      Evdokia             1.65   0.45        4.30           2.00
## 22        Fedir             1.70   0.20        4.15           1.25
## 23        Felix             1.50   2.00        4.55           3.55
## 24       Fialka             1.20   0.75        3.35           2.40
## 25       Flavia             2.55   0.70        4.35           2.40
## 26        Flora             2.30   1.05        3.95           2.90
## 27      Florent             1.20   0.75        3.30           2.40
## 28     Florence             2.60   0.65        4.85           3.05
## 29       Hannah             1.75   1.40        4.95           1.75
## 30        Helen             2.05   1.85        2.95           2.75
## 31       Herman             1.50   1.60        3.00           2.65
## 32       Hilary             1.40   1.90        4.45           3.45
## 33      Lourdes             2.60   1.00        4.65           2.95
## 34      Isadore             1.70   1.85        3.20           2.85
## 35         Ivan             1.20   0.50        3.85           1.70
## 36        Jacob             0.90   1.65        3.75           2.25
## 37     Jeremiah             1.80   2.00        2.90           2.90
## 38       Jervis             2.00   0.45        4.55           2.70
## 39      Joachim             0.00   1.05        3.45           2.70
## 40         John             1.20   1.00        3.20           2.25
## 41     Santiago             0.95   1.70        3.80           2.30
## 42    Josephine             2.95   0.45        4.80           3.90
## 43       Judith             2.45   1.15        4.65           2.25
## 44       Justin             2.50   0.65        4.30           2.35
## 45       Kalyna             1.00   1.30        3.25           1.85
## 46      Larissa             2.50   1.25        4.70           2.30
## 47     Lawrence             1.55   0.95        5.00           2.25
## 48         Leon             1.70   1.95        2.80           2.80
## 49      Leonard             2.90   0.10        4.40           2.25
## 50       Leonid             2.70   1.05        4.00           1.50
## 51        Lesia             1.85   0.35        4.10           3.00
## 52          Leo             1.30   2.40        4.10           2.50
## 53       Louise             2.25   2.05        3.15           2.95
## 54      Lubomyr             1.40   1.20        3.35           2.45
## 55        Lydia             1.90   0.40        4.35           1.45
## 56    Magdalyna             1.45   1.30        3.85           3.50
## 57       Maksym             2.45   2.20        3.70           3.45
## 58       Marcel             2.70   1.25        4.80           2.75
## 59     Margaret             2.15   0.90        3.80           2.70
## 60        Maria             1.15   2.25        4.00           2.35
## 61       Marian             1.55   0.95        4.95           2.25
## 62     Marianna             2.55   0.95        4.60           2.90
## 63      Markian             2.05   0.55        4.65           2.75
## 64        Marko             1.50   1.90        2.75           2.45
## 65       Martha             0.55   1.00        3.60           2.35
## 66       Martin             1.85   0.70        4.50           2.25
## 67       Maryna             2.10   1.25        4.60           3.10
## 68      Matthew             0.80   2.25        3.20           2.65
## 69        Maura             2.65   0.85        4.25           1.85
## 70         Maya             1.15   1.85        4.15           2.60
## 71  Maximillian             1.80   2.70        2.95           3.10
## 72      Melania             2.80   1.10        4.10           1.55
## 73    Methodius             1.80   1.10        4.95           2.40
## 74      Michael             2.60   0.65        4.55           2.25
## 75   Michaelina             1.50   1.00        3.30           3.30
## 76         Mina             2.10   1.20        4.70           2.45
## 77       Monica             1.90   0.40        4.15           3.05
## 78       Mykyta             1.65   1.30        4.85           1.65
## 79        Myron             0.50   0.95        3.55           2.25
## 80     Myroslav             2.25   0.80        4.35           2.30
## 81    Myroslava             2.75   0.90        4.35           1.90
## 82       Salome             1.70   2.30        2.75           4.10
## 83       Samuel             0.80   1.40        3.05           3.20
## 84       Sandra             1.15   1.85        3.80           2.50
## 85        Sarah             1.30   1.50        4.25           3.00
## 86       Savina             1.25   1.55        3.50           2.10
## 87    Sebastian             1.20   1.45        4.20           2.95
## 88       Sophia             1.05   1.75        3.70           2.40
## 89      Stephan             1.45   0.60        3.65           3.05
## 90    Stephania             2.15   1.25        4.65           3.15
## 91      Susanna             1.50   1.40        3.90           3.55
## 92       Sylvan             2.40   0.85        3.80           2.10
## 93    Sylvester             1.55   2.10        2.55           3.90
## 94       Tamara             0.95   1.35        2.50           2.45
## 95     Theodore             2.00   0.25        3.35           2.25
## 96       Teofan             0.30   0.80        3.20           2.50
## 97       Teofil             3.05   0.25        4.60           2.40
## 98      Teofila             1.00   1.40        2.60           2.50
## 99         Teon             1.55   1.10        3.35           3.40
## 100      Teresa             1.25   0.90        4.50           2.50
##     ValorEducativo ServicioRetorno TamanoPaquete Calidad.Producto
## 1              2.4             2.3          2.60             2.10
## 2              2.5             4.0          4.20             2.15
## 3              4.3             2.7          4.10             2.60
## 4              1.8             2.3          3.90             1.95
## 5              3.4             4.6          2.25             3.40
## 6              2.6             1.9          4.85             2.20
## 7              3.5             4.5          3.80             2.90
## 8              2.8             2.2          3.45             2.15
## 9              3.5             3.0          3.80             2.70
## 10             3.7             3.2          4.35             2.70
## 11             2.0             2.8          2.90             2.15
## 12             3.0             2.5          4.15             2.50
## 13             2.1             1.4          3.30             2.20
## 14             2.7             3.7          3.35             2.50
## 15             3.0             2.6          3.40             2.95
## 16             2.7             1.7          2.40             2.35
## 17             3.6             2.9          3.10             2.20
## 18             3.4             1.5          2.95             2.80
## 19             3.3             3.9          3.40             2.95
## 20             3.0             2.6          3.40             3.00
## 21             2.1             1.8          3.15             2.25
## 22             1.2             1.7          2.60             1.65
## 23             3.5             3.4          4.20             2.60
## 24             1.9             2.5          3.60             1.85
## 25             3.3             2.6          1.90             2.45
## 26             3.4             2.8          2.35             2.95
## 27             1.9             2.5          3.60             1.85
## 28             3.2             3.9          3.35             2.90
## 29             3.1             1.7          2.70             2.70
## 30             3.9             3.0          4.20             2.55
## 31             3.1             3.0          4.00             1.65
## 32             3.3             3.2          4.10             2.50
## 33             3.7             2.4          2.30             3.05
## 34             3.5             3.4          4.20             1.90
## 35             1.7             1.1          3.10             2.05
## 36             2.5             2.4          3.80             1.80
## 37             3.7             2.5          4.65             2.40
## 38             2.4             2.6          3.65             2.55
## 39             1.1             2.6          4.45             1.95
## 40             2.1             2.2          4.40             1.65
## 41             2.6             2.5          3.85             1.85
## 42             3.4             4.6          2.25             3.35
## 43             3.6             1.3          3.10             2.95
## 44             3.1             2.5          1.85             2.40
## 45             2.4             1.7          4.25             1.60
## 46             3.7             1.4          3.15             3.00
## 47             2.6             3.2          1.90             2.45
## 48             3.6             2.3          4.55             2.35
## 49             3.0             2.4          3.35             2.45
## 50             3.8             1.4          2.60             1.90
## 51             2.1             2.5          2.60             2.50
## 52             3.6             2.5          4.50             2.60
## 53             4.3             3.4          4.40             2.75
## 54             2.5             2.6          4.60             1.85
## 55             1.6             2.1          2.80             1.85
## 56             2.8             3.6          3.85             2.10
## 57             4.6             4.0          4.80             3.10
## 58             4.0             3.0          3.85             3.00
## 59             3.1             2.5          2.20             2.80
## 60             3.3             2.2          4.35             2.50
## 61             2.6             3.1          1.90             2.40
## 62             3.6             2.3          2.25             3.05
## 63             2.5             2.7          3.70             2.65
## 64             3.4             2.6          3.00             2.10
## 65             1.6             3.2          5.00             1.70
## 66             2.6             2.3          3.40             2.45
## 67             3.3             3.9          3.65             3.00
## 68             3.0             2.5          3.55             2.25
## 69             3.5             1.9          2.40             2.15
## 70             3.0             2.3          4.55             2.40
## 71             4.5             2.9          4.20             2.70
## 72             4.0             1.6          2.65             1.95
## 73             2.9             1.9          2.45             2.45
## 74             3.3             2.7          3.65             2.55
## 75             2.4             2.7          4.10             2.05
## 76             3.2             2.7          4.25             2.60
## 77             2.2             2.6          2.65             2.55
## 78             2.9             1.5          2.60             2.55
## 79             1.5             3.1          4.95             1.65
## 80             3.1             2.1          3.40             2.55
## 81             3.6             2.1          2.45             2.25
## 82             4.0             4.4          3.15             2.80
## 83             2.3             3.8          4.10             2.05
## 84             3.0             2.5          3.70             2.20
## 85             2.8             2.8          3.40             2.80
## 86             2.8             2.2          4.50             1.85
## 87             2.7             2.7          3.35             2.75
## 88             2.8             2.3          3.60             2.15
## 89             2.0             2.5          4.00             2.00
## 90             3.4             4.0          3.70             3.05
## 91             3.0             3.8          3.95             2.20
## 92             3.3             1.4          2.90             2.75
## 93             3.6             4.0          2.95             2.60
## 94             2.2             2.5          4.10             1.80
## 95             2.2             2.1          2.50             2.00
## 96             0.7             2.1          4.20             1.70
## 97             3.3             2.8          3.55             2.60
## 98             2.4             2.7          4.20             1.85
## 99             2.6             2.9          4.20             2.15
## 100            2.2             3.0          3.00             2.20
##     NumeroEstrellas
## 1               1.7
## 2               2.8
## 3               3.3
## 4               1.7
## 5               4.3
## 6               3.0
## 7               3.1
## 8               2.9
## 9               4.8
## 10              3.9
## 11              1.7
## 12              3.2
## 13              2.4
## 14              2.3
## 15              3.9
## 16              3.4
## 17              2.3
## 18              2.5
## 19              3.9
## 20              4.0
## 21              2.6
## 22              2.0
## 23              4.0
## 24              2.1
## 25              3.4
## 26              3.4
## 27              2.1
## 28              3.9
## 29              3.4
## 30              3.1
## 31              2.8
## 32              3.8
## 33              4.5
## 34              3.2
## 35              2.0
## 36              2.4
## 37              2.9
## 38              3.1
## 39              1.4
## 40              1.3
## 41              2.5
## 42              4.3
## 43              3.8
## 44              3.3
## 45              2.3
## 46              3.9
## 47              4.0
## 48              2.8
## 49              4.2
## 50              3.8
## 51              2.6
## 52              3.8
## 53              3.5
## 54              1.7
## 55              2.4
## 56              3.2
## 57              4.7
## 58              5.0
## 59              3.1
## 60              3.5
## 61              3.9
## 62              4.5
## 63              3.2
## 64              2.1
## 65              2.5
## 66              3.0
## 67              4.4
## 68              3.1
## 69              4.3
## 70              3.4
## 71              3.5
## 72              4.0
## 73              3.6
## 74              4.5
## 75              2.6
## 76              3.4
## 77              2.7
## 78              3.2
## 79              2.4
## 80              4.1
## 81              4.4
## 82              3.2
## 83              2.6
## 84              2.2
## 85              3.8
## 86              2.8
## 87              3.6
## 88              2.1
## 89              1.9
## 90              4.5
## 91              3.4
## 92              2.4
## 93              2.8
## 94              2.1
## 95              1.6
## 96              1.0
## 97              4.5
## 98              2.3
## 99              2.7
## 100             1.8
datos1 <- read.csv('EjemploAlgoritmosRecomendacion.csv', header=TRUE, sep=';',dec=',',row.names=1)
datos1
##             VelocidadEntrega Precio Durabilidad ImagenProducto
## Adam                    2.05   0.30        3.45           2.35
## Anna                    0.90   1.50        3.15           3.30
## Bernard                 1.70   2.60        2.85           3.00
## Edward                  1.35   0.50        3.55           2.95
## Emilia                  3.00   0.45        4.80           3.90
## Fabian                  0.95   1.65        3.95           2.40
## Philip                  2.30   1.20        4.75           3.30
## Frank                   0.65   2.10        3.10           2.55
## Xavier                  2.75   0.80        4.70           2.35
## Gabriel                 2.00   1.75        3.25           3.00
## Marisol                 1.20   0.80        4.40           2.40
## Henry                   1.95   1.10        4.55           2.30
## Irene                   1.40   0.70        4.05           1.90
## Isabelle                1.85   0.75        4.30           2.85
## Isidore                 2.35   0.65        4.95           3.35
## Joseph                  1.70   1.00        4.85           2.35
## Eugene                  1.60   2.05        2.85           2.55
## Eugenia                 2.45   0.90        3.85           2.15
## Eunice                  2.65   0.70        4.85           3.05
## Eva                     2.35   0.65        4.95           3.35
## Evdokia                 1.65   0.45        4.30           2.00
## Fedir                   1.70   0.20        4.15           1.25
## Felix                   1.50   2.00        4.55           3.55
## Fialka                  1.20   0.75        3.35           2.40
## Flavia                  2.55   0.70        4.35           2.40
## Flora                   2.30   1.05        3.95           2.90
## Florent                 1.20   0.75        3.30           2.40
## Florence                2.60   0.65        4.85           3.05
## Hannah                  1.75   1.40        4.95           1.75
## Helen                   2.05   1.85        2.95           2.75
## Herman                  1.50   1.60        3.00           2.65
## Hilary                  1.40   1.90        4.45           3.45
## Lourdes                 2.60   1.00        4.65           2.95
## Isadore                 1.70   1.85        3.20           2.85
## Ivan                    1.20   0.50        3.85           1.70
## Jacob                   0.90   1.65        3.75           2.25
## Jeremiah                1.80   2.00        2.90           2.90
## Jervis                  2.00   0.45        4.55           2.70
## Joachim                 0.00   1.05        3.45           2.70
## John                    1.20   1.00        3.20           2.25
## Santiago                0.95   1.70        3.80           2.30
## Josephine               2.95   0.45        4.80           3.90
## Judith                  2.45   1.15        4.65           2.25
## Justin                  2.50   0.65        4.30           2.35
## Kalyna                  1.00   1.30        3.25           1.85
## Larissa                 2.50   1.25        4.70           2.30
## Lawrence                1.55   0.95        5.00           2.25
## Leon                    1.70   1.95        2.80           2.80
## Leonard                 2.90   0.10        4.40           2.25
## Leonid                  2.70   1.05        4.00           1.50
## Lesia                   1.85   0.35        4.10           3.00
## Leo                     1.30   2.40        4.10           2.50
## Louise                  2.25   2.05        3.15           2.95
## Lubomyr                 1.40   1.20        3.35           2.45
## Lydia                   1.90   0.40        4.35           1.45
## Magdalyna               1.45   1.30        3.85           3.50
## Maksym                  2.45   2.20        3.70           3.45
## Marcel                  2.70   1.25        4.80           2.75
## Margaret                2.15   0.90        3.80           2.70
## Maria                   1.15   2.25        4.00           2.35
## Marian                  1.55   0.95        4.95           2.25
## Marianna                2.55   0.95        4.60           2.90
## Markian                 2.05   0.55        4.65           2.75
## Marko                   1.50   1.90        2.75           2.45
## Martha                  0.55   1.00        3.60           2.35
## Martin                  1.85   0.70        4.50           2.25
## Maryna                  2.10   1.25        4.60           3.10
## Matthew                 0.80   2.25        3.20           2.65
## Maura                   2.65   0.85        4.25           1.85
## Maya                    1.15   1.85        4.15           2.60
## Maximillian             1.80   2.70        2.95           3.10
## Melania                 2.80   1.10        4.10           1.55
## Methodius               1.80   1.10        4.95           2.40
## Michael                 2.60   0.65        4.55           2.25
## Michaelina              1.50   1.00        3.30           3.30
## Mina                    2.10   1.20        4.70           2.45
## Monica                  1.90   0.40        4.15           3.05
## Mykyta                  1.65   1.30        4.85           1.65
## Myron                   0.50   0.95        3.55           2.25
## Myroslav                2.25   0.80        4.35           2.30
## Myroslava               2.75   0.90        4.35           1.90
## Salome                  1.70   2.30        2.75           4.10
## Samuel                  0.80   1.40        3.05           3.20
## Sandra                  1.15   1.85        3.80           2.50
## Sarah                   1.30   1.50        4.25           3.00
## Savina                  1.25   1.55        3.50           2.10
## Sebastian               1.20   1.45        4.20           2.95
## Sophia                  1.05   1.75        3.70           2.40
## Stephan                 1.45   0.60        3.65           3.05
## Stephania               2.15   1.25        4.65           3.15
## Susanna                 1.50   1.40        3.90           3.55
## Sylvan                  2.40   0.85        3.80           2.10
## Sylvester               1.55   2.10        2.55           3.90
## Tamara                  0.95   1.35        2.50           2.45
## Theodore                2.00   0.25        3.35           2.25
## Teofan                  0.30   0.80        3.20           2.50
## Teofil                  3.05   0.25        4.60           2.40
## Teofila                 1.00   1.40        2.60           2.50
## Teon                    1.55   1.10        3.35           3.40
## Teresa                  1.25   0.90        4.50           2.50
##             ValorEducativo ServicioRetorno TamanoPaquete Calidad.Producto
## Adam                   2.4             2.3          2.60             2.10
## Anna                   2.5             4.0          4.20             2.15
## Bernard                4.3             2.7          4.10             2.60
## Edward                 1.8             2.3          3.90             1.95
## Emilia                 3.4             4.6          2.25             3.40
## Fabian                 2.6             1.9          4.85             2.20
## Philip                 3.5             4.5          3.80             2.90
## Frank                  2.8             2.2          3.45             2.15
## Xavier                 3.5             3.0          3.80             2.70
## Gabriel                3.7             3.2          4.35             2.70
## Marisol                2.0             2.8          2.90             2.15
## Henry                  3.0             2.5          4.15             2.50
## Irene                  2.1             1.4          3.30             2.20
## Isabelle               2.7             3.7          3.35             2.50
## Isidore                3.0             2.6          3.40             2.95
## Joseph                 2.7             1.7          2.40             2.35
## Eugene                 3.6             2.9          3.10             2.20
## Eugenia                3.4             1.5          2.95             2.80
## Eunice                 3.3             3.9          3.40             2.95
## Eva                    3.0             2.6          3.40             3.00
## Evdokia                2.1             1.8          3.15             2.25
## Fedir                  1.2             1.7          2.60             1.65
## Felix                  3.5             3.4          4.20             2.60
## Fialka                 1.9             2.5          3.60             1.85
## Flavia                 3.3             2.6          1.90             2.45
## Flora                  3.4             2.8          2.35             2.95
## Florent                1.9             2.5          3.60             1.85
## Florence               3.2             3.9          3.35             2.90
## Hannah                 3.1             1.7          2.70             2.70
## Helen                  3.9             3.0          4.20             2.55
## Herman                 3.1             3.0          4.00             1.65
## Hilary                 3.3             3.2          4.10             2.50
## Lourdes                3.7             2.4          2.30             3.05
## Isadore                3.5             3.4          4.20             1.90
## Ivan                   1.7             1.1          3.10             2.05
## Jacob                  2.5             2.4          3.80             1.80
## Jeremiah               3.7             2.5          4.65             2.40
## Jervis                 2.4             2.6          3.65             2.55
## Joachim                1.1             2.6          4.45             1.95
## John                   2.1             2.2          4.40             1.65
## Santiago               2.6             2.5          3.85             1.85
## Josephine              3.4             4.6          2.25             3.35
## Judith                 3.6             1.3          3.10             2.95
## Justin                 3.1             2.5          1.85             2.40
## Kalyna                 2.4             1.7          4.25             1.60
## Larissa                3.7             1.4          3.15             3.00
## Lawrence               2.6             3.2          1.90             2.45
## Leon                   3.6             2.3          4.55             2.35
## Leonard                3.0             2.4          3.35             2.45
## Leonid                 3.8             1.4          2.60             1.90
## Lesia                  2.1             2.5          2.60             2.50
## Leo                    3.6             2.5          4.50             2.60
## Louise                 4.3             3.4          4.40             2.75
## Lubomyr                2.5             2.6          4.60             1.85
## Lydia                  1.6             2.1          2.80             1.85
## Magdalyna              2.8             3.6          3.85             2.10
## Maksym                 4.6             4.0          4.80             3.10
## Marcel                 4.0             3.0          3.85             3.00
## Margaret               3.1             2.5          2.20             2.80
## Maria                  3.3             2.2          4.35             2.50
## Marian                 2.6             3.1          1.90             2.40
## Marianna               3.6             2.3          2.25             3.05
## Markian                2.5             2.7          3.70             2.65
## Marko                  3.4             2.6          3.00             2.10
## Martha                 1.6             3.2          5.00             1.70
## Martin                 2.6             2.3          3.40             2.45
## Maryna                 3.3             3.9          3.65             3.00
## Matthew                3.0             2.5          3.55             2.25
## Maura                  3.5             1.9          2.40             2.15
## Maya                   3.0             2.3          4.55             2.40
## Maximillian            4.5             2.9          4.20             2.70
## Melania                4.0             1.6          2.65             1.95
## Methodius              2.9             1.9          2.45             2.45
## Michael                3.3             2.7          3.65             2.55
## Michaelina             2.4             2.7          4.10             2.05
## Mina                   3.2             2.7          4.25             2.60
## Monica                 2.2             2.6          2.65             2.55
## Mykyta                 2.9             1.5          2.60             2.55
## Myron                  1.5             3.1          4.95             1.65
## Myroslav               3.1             2.1          3.40             2.55
## Myroslava              3.6             2.1          2.45             2.25
## Salome                 4.0             4.4          3.15             2.80
## Samuel                 2.3             3.8          4.10             2.05
## Sandra                 3.0             2.5          3.70             2.20
## Sarah                  2.8             2.8          3.40             2.80
## Savina                 2.8             2.2          4.50             1.85
## Sebastian              2.7             2.7          3.35             2.75
## Sophia                 2.8             2.3          3.60             2.15
## Stephan                2.0             2.5          4.00             2.00
## Stephania              3.4             4.0          3.70             3.05
## Susanna                3.0             3.8          3.95             2.20
## Sylvan                 3.3             1.4          2.90             2.75
## Sylvester              3.6             4.0          2.95             2.60
## Tamara                 2.2             2.5          4.10             1.80
## Theodore               2.2             2.1          2.50             2.00
## Teofan                 0.7             2.1          4.20             1.70
## Teofil                 3.3             2.8          3.55             2.60
## Teofila                2.4             2.7          4.20             1.85
## Teon                   2.6             2.9          4.20             2.15
## Teresa                 2.2             3.0          3.00             2.20
##             NumeroEstrellas
## Adam                    1.7
## Anna                    2.8
## Bernard                 3.3
## Edward                  1.7
## Emilia                  4.3
## Fabian                  3.0
## Philip                  3.1
## Frank                   2.9
## Xavier                  4.8
## Gabriel                 3.9
## Marisol                 1.7
## Henry                   3.2
## Irene                   2.4
## Isabelle                2.3
## Isidore                 3.9
## Joseph                  3.4
## Eugene                  2.3
## Eugenia                 2.5
## Eunice                  3.9
## Eva                     4.0
## Evdokia                 2.6
## Fedir                   2.0
## Felix                   4.0
## Fialka                  2.1
## Flavia                  3.4
## Flora                   3.4
## Florent                 2.1
## Florence                3.9
## Hannah                  3.4
## Helen                   3.1
## Herman                  2.8
## Hilary                  3.8
## Lourdes                 4.5
## Isadore                 3.2
## Ivan                    2.0
## Jacob                   2.4
## Jeremiah                2.9
## Jervis                  3.1
## Joachim                 1.4
## John                    1.3
## Santiago                2.5
## Josephine               4.3
## Judith                  3.8
## Justin                  3.3
## Kalyna                  2.3
## Larissa                 3.9
## Lawrence                4.0
## Leon                    2.8
## Leonard                 4.2
## Leonid                  3.8
## Lesia                   2.6
## Leo                     3.8
## Louise                  3.5
## Lubomyr                 1.7
## Lydia                   2.4
## Magdalyna               3.2
## Maksym                  4.7
## Marcel                  5.0
## Margaret                3.1
## Maria                   3.5
## Marian                  3.9
## Marianna                4.5
## Markian                 3.2
## Marko                   2.1
## Martha                  2.5
## Martin                  3.0
## Maryna                  4.4
## Matthew                 3.1
## Maura                   4.3
## Maya                    3.4
## Maximillian             3.5
## Melania                 4.0
## Methodius               3.6
## Michael                 4.5
## Michaelina              2.6
## Mina                    3.4
## Monica                  2.7
## Mykyta                  3.2
## Myron                   2.4
## Myroslav                4.1
## Myroslava               4.4
## Salome                  3.2
## Samuel                  2.6
## Sandra                  2.2
## Sarah                   3.8
## Savina                  2.8
## Sebastian               3.6
## Sophia                  2.1
## Stephan                 1.9
## Stephania               4.5
## Susanna                 3.4
## Sylvan                  2.4
## Sylvester               2.8
## Tamara                  2.1
## Theodore                1.6
## Teofan                  1.0
## Teofil                  4.5
## Teofila                 2.3
## Teon                    2.7
## Teresa                  1.8
algoritmos_recomendacion <- as.data.frame(datos1)
algoritmos_recomendacion
##             VelocidadEntrega Precio Durabilidad ImagenProducto
## Adam                    2.05   0.30        3.45           2.35
## Anna                    0.90   1.50        3.15           3.30
## Bernard                 1.70   2.60        2.85           3.00
## Edward                  1.35   0.50        3.55           2.95
## Emilia                  3.00   0.45        4.80           3.90
## Fabian                  0.95   1.65        3.95           2.40
## Philip                  2.30   1.20        4.75           3.30
## Frank                   0.65   2.10        3.10           2.55
## Xavier                  2.75   0.80        4.70           2.35
## Gabriel                 2.00   1.75        3.25           3.00
## Marisol                 1.20   0.80        4.40           2.40
## Henry                   1.95   1.10        4.55           2.30
## Irene                   1.40   0.70        4.05           1.90
## Isabelle                1.85   0.75        4.30           2.85
## Isidore                 2.35   0.65        4.95           3.35
## Joseph                  1.70   1.00        4.85           2.35
## Eugene                  1.60   2.05        2.85           2.55
## Eugenia                 2.45   0.90        3.85           2.15
## Eunice                  2.65   0.70        4.85           3.05
## Eva                     2.35   0.65        4.95           3.35
## Evdokia                 1.65   0.45        4.30           2.00
## Fedir                   1.70   0.20        4.15           1.25
## Felix                   1.50   2.00        4.55           3.55
## Fialka                  1.20   0.75        3.35           2.40
## Flavia                  2.55   0.70        4.35           2.40
## Flora                   2.30   1.05        3.95           2.90
## Florent                 1.20   0.75        3.30           2.40
## Florence                2.60   0.65        4.85           3.05
## Hannah                  1.75   1.40        4.95           1.75
## Helen                   2.05   1.85        2.95           2.75
## Herman                  1.50   1.60        3.00           2.65
## Hilary                  1.40   1.90        4.45           3.45
## Lourdes                 2.60   1.00        4.65           2.95
## Isadore                 1.70   1.85        3.20           2.85
## Ivan                    1.20   0.50        3.85           1.70
## Jacob                   0.90   1.65        3.75           2.25
## Jeremiah                1.80   2.00        2.90           2.90
## Jervis                  2.00   0.45        4.55           2.70
## Joachim                 0.00   1.05        3.45           2.70
## John                    1.20   1.00        3.20           2.25
## Santiago                0.95   1.70        3.80           2.30
## Josephine               2.95   0.45        4.80           3.90
## Judith                  2.45   1.15        4.65           2.25
## Justin                  2.50   0.65        4.30           2.35
## Kalyna                  1.00   1.30        3.25           1.85
## Larissa                 2.50   1.25        4.70           2.30
## Lawrence                1.55   0.95        5.00           2.25
## Leon                    1.70   1.95        2.80           2.80
## Leonard                 2.90   0.10        4.40           2.25
## Leonid                  2.70   1.05        4.00           1.50
## Lesia                   1.85   0.35        4.10           3.00
## Leo                     1.30   2.40        4.10           2.50
## Louise                  2.25   2.05        3.15           2.95
## Lubomyr                 1.40   1.20        3.35           2.45
## Lydia                   1.90   0.40        4.35           1.45
## Magdalyna               1.45   1.30        3.85           3.50
## Maksym                  2.45   2.20        3.70           3.45
## Marcel                  2.70   1.25        4.80           2.75
## Margaret                2.15   0.90        3.80           2.70
## Maria                   1.15   2.25        4.00           2.35
## Marian                  1.55   0.95        4.95           2.25
## Marianna                2.55   0.95        4.60           2.90
## Markian                 2.05   0.55        4.65           2.75
## Marko                   1.50   1.90        2.75           2.45
## Martha                  0.55   1.00        3.60           2.35
## Martin                  1.85   0.70        4.50           2.25
## Maryna                  2.10   1.25        4.60           3.10
## Matthew                 0.80   2.25        3.20           2.65
## Maura                   2.65   0.85        4.25           1.85
## Maya                    1.15   1.85        4.15           2.60
## Maximillian             1.80   2.70        2.95           3.10
## Melania                 2.80   1.10        4.10           1.55
## Methodius               1.80   1.10        4.95           2.40
## Michael                 2.60   0.65        4.55           2.25
## Michaelina              1.50   1.00        3.30           3.30
## Mina                    2.10   1.20        4.70           2.45
## Monica                  1.90   0.40        4.15           3.05
## Mykyta                  1.65   1.30        4.85           1.65
## Myron                   0.50   0.95        3.55           2.25
## Myroslav                2.25   0.80        4.35           2.30
## Myroslava               2.75   0.90        4.35           1.90
## Salome                  1.70   2.30        2.75           4.10
## Samuel                  0.80   1.40        3.05           3.20
## Sandra                  1.15   1.85        3.80           2.50
## Sarah                   1.30   1.50        4.25           3.00
## Savina                  1.25   1.55        3.50           2.10
## Sebastian               1.20   1.45        4.20           2.95
## Sophia                  1.05   1.75        3.70           2.40
## Stephan                 1.45   0.60        3.65           3.05
## Stephania               2.15   1.25        4.65           3.15
## Susanna                 1.50   1.40        3.90           3.55
## Sylvan                  2.40   0.85        3.80           2.10
## Sylvester               1.55   2.10        2.55           3.90
## Tamara                  0.95   1.35        2.50           2.45
## Theodore                2.00   0.25        3.35           2.25
## Teofan                  0.30   0.80        3.20           2.50
## Teofil                  3.05   0.25        4.60           2.40
## Teofila                 1.00   1.40        2.60           2.50
## Teon                    1.55   1.10        3.35           3.40
## Teresa                  1.25   0.90        4.50           2.50
##             ValorEducativo ServicioRetorno TamanoPaquete Calidad.Producto
## Adam                   2.4             2.3          2.60             2.10
## Anna                   2.5             4.0          4.20             2.15
## Bernard                4.3             2.7          4.10             2.60
## Edward                 1.8             2.3          3.90             1.95
## Emilia                 3.4             4.6          2.25             3.40
## Fabian                 2.6             1.9          4.85             2.20
## Philip                 3.5             4.5          3.80             2.90
## Frank                  2.8             2.2          3.45             2.15
## Xavier                 3.5             3.0          3.80             2.70
## Gabriel                3.7             3.2          4.35             2.70
## Marisol                2.0             2.8          2.90             2.15
## Henry                  3.0             2.5          4.15             2.50
## Irene                  2.1             1.4          3.30             2.20
## Isabelle               2.7             3.7          3.35             2.50
## Isidore                3.0             2.6          3.40             2.95
## Joseph                 2.7             1.7          2.40             2.35
## Eugene                 3.6             2.9          3.10             2.20
## Eugenia                3.4             1.5          2.95             2.80
## Eunice                 3.3             3.9          3.40             2.95
## Eva                    3.0             2.6          3.40             3.00
## Evdokia                2.1             1.8          3.15             2.25
## Fedir                  1.2             1.7          2.60             1.65
## Felix                  3.5             3.4          4.20             2.60
## Fialka                 1.9             2.5          3.60             1.85
## Flavia                 3.3             2.6          1.90             2.45
## Flora                  3.4             2.8          2.35             2.95
## Florent                1.9             2.5          3.60             1.85
## Florence               3.2             3.9          3.35             2.90
## Hannah                 3.1             1.7          2.70             2.70
## Helen                  3.9             3.0          4.20             2.55
## Herman                 3.1             3.0          4.00             1.65
## Hilary                 3.3             3.2          4.10             2.50
## Lourdes                3.7             2.4          2.30             3.05
## Isadore                3.5             3.4          4.20             1.90
## Ivan                   1.7             1.1          3.10             2.05
## Jacob                  2.5             2.4          3.80             1.80
## Jeremiah               3.7             2.5          4.65             2.40
## Jervis                 2.4             2.6          3.65             2.55
## Joachim                1.1             2.6          4.45             1.95
## John                   2.1             2.2          4.40             1.65
## Santiago               2.6             2.5          3.85             1.85
## Josephine              3.4             4.6          2.25             3.35
## Judith                 3.6             1.3          3.10             2.95
## Justin                 3.1             2.5          1.85             2.40
## Kalyna                 2.4             1.7          4.25             1.60
## Larissa                3.7             1.4          3.15             3.00
## Lawrence               2.6             3.2          1.90             2.45
## Leon                   3.6             2.3          4.55             2.35
## Leonard                3.0             2.4          3.35             2.45
## Leonid                 3.8             1.4          2.60             1.90
## Lesia                  2.1             2.5          2.60             2.50
## Leo                    3.6             2.5          4.50             2.60
## Louise                 4.3             3.4          4.40             2.75
## Lubomyr                2.5             2.6          4.60             1.85
## Lydia                  1.6             2.1          2.80             1.85
## Magdalyna              2.8             3.6          3.85             2.10
## Maksym                 4.6             4.0          4.80             3.10
## Marcel                 4.0             3.0          3.85             3.00
## Margaret               3.1             2.5          2.20             2.80
## Maria                  3.3             2.2          4.35             2.50
## Marian                 2.6             3.1          1.90             2.40
## Marianna               3.6             2.3          2.25             3.05
## Markian                2.5             2.7          3.70             2.65
## Marko                  3.4             2.6          3.00             2.10
## Martha                 1.6             3.2          5.00             1.70
## Martin                 2.6             2.3          3.40             2.45
## Maryna                 3.3             3.9          3.65             3.00
## Matthew                3.0             2.5          3.55             2.25
## Maura                  3.5             1.9          2.40             2.15
## Maya                   3.0             2.3          4.55             2.40
## Maximillian            4.5             2.9          4.20             2.70
## Melania                4.0             1.6          2.65             1.95
## Methodius              2.9             1.9          2.45             2.45
## Michael                3.3             2.7          3.65             2.55
## Michaelina             2.4             2.7          4.10             2.05
## Mina                   3.2             2.7          4.25             2.60
## Monica                 2.2             2.6          2.65             2.55
## Mykyta                 2.9             1.5          2.60             2.55
## Myron                  1.5             3.1          4.95             1.65
## Myroslav               3.1             2.1          3.40             2.55
## Myroslava              3.6             2.1          2.45             2.25
## Salome                 4.0             4.4          3.15             2.80
## Samuel                 2.3             3.8          4.10             2.05
## Sandra                 3.0             2.5          3.70             2.20
## Sarah                  2.8             2.8          3.40             2.80
## Savina                 2.8             2.2          4.50             1.85
## Sebastian              2.7             2.7          3.35             2.75
## Sophia                 2.8             2.3          3.60             2.15
## Stephan                2.0             2.5          4.00             2.00
## Stephania              3.4             4.0          3.70             3.05
## Susanna                3.0             3.8          3.95             2.20
## Sylvan                 3.3             1.4          2.90             2.75
## Sylvester              3.6             4.0          2.95             2.60
## Tamara                 2.2             2.5          4.10             1.80
## Theodore               2.2             2.1          2.50             2.00
## Teofan                 0.7             2.1          4.20             1.70
## Teofil                 3.3             2.8          3.55             2.60
## Teofila                2.4             2.7          4.20             1.85
## Teon                   2.6             2.9          4.20             2.15
## Teresa                 2.2             3.0          3.00             2.20
##             NumeroEstrellas
## Adam                    1.7
## Anna                    2.8
## Bernard                 3.3
## Edward                  1.7
## Emilia                  4.3
## Fabian                  3.0
## Philip                  3.1
## Frank                   2.9
## Xavier                  4.8
## Gabriel                 3.9
## Marisol                 1.7
## Henry                   3.2
## Irene                   2.4
## Isabelle                2.3
## Isidore                 3.9
## Joseph                  3.4
## Eugene                  2.3
## Eugenia                 2.5
## Eunice                  3.9
## Eva                     4.0
## Evdokia                 2.6
## Fedir                   2.0
## Felix                   4.0
## Fialka                  2.1
## Flavia                  3.4
## Flora                   3.4
## Florent                 2.1
## Florence                3.9
## Hannah                  3.4
## Helen                   3.1
## Herman                  2.8
## Hilary                  3.8
## Lourdes                 4.5
## Isadore                 3.2
## Ivan                    2.0
## Jacob                   2.4
## Jeremiah                2.9
## Jervis                  3.1
## Joachim                 1.4
## John                    1.3
## Santiago                2.5
## Josephine               4.3
## Judith                  3.8
## Justin                  3.3
## Kalyna                  2.3
## Larissa                 3.9
## Lawrence                4.0
## Leon                    2.8
## Leonard                 4.2
## Leonid                  3.8
## Lesia                   2.6
## Leo                     3.8
## Louise                  3.5
## Lubomyr                 1.7
## Lydia                   2.4
## Magdalyna               3.2
## Maksym                  4.7
## Marcel                  5.0
## Margaret                3.1
## Maria                   3.5
## Marian                  3.9
## Marianna                4.5
## Markian                 3.2
## Marko                   2.1
## Martha                  2.5
## Martin                  3.0
## Maryna                  4.4
## Matthew                 3.1
## Maura                   4.3
## Maya                    3.4
## Maximillian             3.5
## Melania                 4.0
## Methodius               3.6
## Michael                 4.5
## Michaelina              2.6
## Mina                    3.4
## Monica                  2.7
## Mykyta                  3.2
## Myron                   2.4
## Myroslav                4.1
## Myroslava               4.4
## Salome                  3.2
## Samuel                  2.6
## Sandra                  2.2
## Sarah                   3.8
## Savina                  2.8
## Sebastian               3.6
## Sophia                  2.1
## Stephan                 1.9
## Stephania               4.5
## Susanna                 3.4
## Sylvan                  2.4
## Sylvester               2.8
## Tamara                  2.1
## Theodore                1.6
## Teofan                  1.0
## Teofil                  4.5
## Teofila                 2.3
## Teon                    2.7
## Teresa                  1.8
dim(algoritmos_recomendacion)
## [1] 100   9
algoritmos_recomendacion$Durabilidad
##   [1] 3.45 3.15 2.85 3.55 4.80 3.95 4.75 3.10 4.70 3.25 4.40 4.55 4.05 4.30
##  [15] 4.95 4.85 2.85 3.85 4.85 4.95 4.30 4.15 4.55 3.35 4.35 3.95 3.30 4.85
##  [29] 4.95 2.95 3.00 4.45 4.65 3.20 3.85 3.75 2.90 4.55 3.45 3.20 3.80 4.80
##  [43] 4.65 4.30 3.25 4.70 5.00 2.80 4.40 4.00 4.10 4.10 3.15 3.35 4.35 3.85
##  [57] 3.70 4.80 3.80 4.00 4.95 4.60 4.65 2.75 3.60 4.50 4.60 3.20 4.25 4.15
##  [71] 2.95 4.10 4.95 4.55 3.30 4.70 4.15 4.85 3.55 4.35 4.35 2.75 3.05 3.80
##  [85] 4.25 3.50 4.20 3.70 3.65 4.65 3.90 3.80 2.55 2.50 3.35 3.20 4.60 2.60
##  [99] 3.35 4.50
algoritmos_recomendacion$Precio
##   [1] 0.30 1.50 2.60 0.50 0.45 1.65 1.20 2.10 0.80 1.75 0.80 1.10 0.70 0.75
##  [15] 0.65 1.00 2.05 0.90 0.70 0.65 0.45 0.20 2.00 0.75 0.70 1.05 0.75 0.65
##  [29] 1.40 1.85 1.60 1.90 1.00 1.85 0.50 1.65 2.00 0.45 1.05 1.00 1.70 0.45
##  [43] 1.15 0.65 1.30 1.25 0.95 1.95 0.10 1.05 0.35 2.40 2.05 1.20 0.40 1.30
##  [57] 2.20 1.25 0.90 2.25 0.95 0.95 0.55 1.90 1.00 0.70 1.25 2.25 0.85 1.85
##  [71] 2.70 1.10 1.10 0.65 1.00 1.20 0.40 1.30 0.95 0.80 0.90 2.30 1.40 1.85
##  [85] 1.50 1.55 1.45 1.75 0.60 1.25 1.40 0.85 2.10 1.35 0.25 0.80 0.25 1.40
##  [99] 1.10 0.90
algoritmos_recomendacion[,1]
##   [1] 2.05 0.90 1.70 1.35 3.00 0.95 2.30 0.65 2.75 2.00 1.20 1.95 1.40 1.85
##  [15] 2.35 1.70 1.60 2.45 2.65 2.35 1.65 1.70 1.50 1.20 2.55 2.30 1.20 2.60
##  [29] 1.75 2.05 1.50 1.40 2.60 1.70 1.20 0.90 1.80 2.00 0.00 1.20 0.95 2.95
##  [43] 2.45 2.50 1.00 2.50 1.55 1.70 2.90 2.70 1.85 1.30 2.25 1.40 1.90 1.45
##  [57] 2.45 2.70 2.15 1.15 1.55 2.55 2.05 1.50 0.55 1.85 2.10 0.80 2.65 1.15
##  [71] 1.80 2.80 1.80 2.60 1.50 2.10 1.90 1.65 0.50 2.25 2.75 1.70 0.80 1.15
##  [85] 1.30 1.25 1.20 1.05 1.45 2.15 1.50 2.40 1.55 0.95 2.00 0.30 3.05 1.00
##  [99] 1.55 1.25
algoritmos_recomendacion[,2]
##   [1] 0.30 1.50 2.60 0.50 0.45 1.65 1.20 2.10 0.80 1.75 0.80 1.10 0.70 0.75
##  [15] 0.65 1.00 2.05 0.90 0.70 0.65 0.45 0.20 2.00 0.75 0.70 1.05 0.75 0.65
##  [29] 1.40 1.85 1.60 1.90 1.00 1.85 0.50 1.65 2.00 0.45 1.05 1.00 1.70 0.45
##  [43] 1.15 0.65 1.30 1.25 0.95 1.95 0.10 1.05 0.35 2.40 2.05 1.20 0.40 1.30
##  [57] 2.20 1.25 0.90 2.25 0.95 0.95 0.55 1.90 1.00 0.70 1.25 2.25 0.85 1.85
##  [71] 2.70 1.10 1.10 0.65 1.00 1.20 0.40 1.30 0.95 0.80 0.90 2.30 1.40 1.85
##  [85] 1.50 1.55 1.45 1.75 0.60 1.25 1.40 0.85 2.10 1.35 0.25 0.80 0.25 1.40
##  [99] 1.10 0.90
str(algoritmos_recomendacion)
## 'data.frame':    100 obs. of  9 variables:
##  $ VelocidadEntrega: num  2.05 0.9 1.7 1.35 3 0.95 2.3 0.65 2.75 2 ...
##  $ Precio          : num  0.3 1.5 2.6 0.5 0.45 1.65 1.2 2.1 0.8 1.75 ...
##  $ Durabilidad     : num  3.45 3.15 2.85 3.55 4.8 3.95 4.75 3.1 4.7 3.25 ...
##  $ ImagenProducto  : num  2.35 3.3 3 2.95 3.9 2.4 3.3 2.55 2.35 3 ...
##  $ ValorEducativo  : num  2.4 2.5 4.3 1.8 3.4 2.6 3.5 2.8 3.5 3.7 ...
##  $ ServicioRetorno : num  2.3 4 2.7 2.3 4.6 1.9 4.5 2.2 3 3.2 ...
##  $ TamanoPaquete   : num  2.6 4.2 4.1 3.9 2.25 4.85 3.8 3.45 3.8 4.35 ...
##  $ Calidad.Producto: num  2.1 2.15 2.6 1.95 3.4 2.2 2.9 2.15 2.7 2.7 ...
##  $ NumeroEstrellas : num  1.7 2.8 3.3 1.7 4.3 3 3.1 2.9 4.8 3.9 ...
summary(algoritmos_recomendacion)
##  VelocidadEntrega     Precio        Durabilidad    ImagenProducto 
##  Min.   :0.000    Min.   :0.1000   Min.   :2.500   Min.   :1.250  
##  1st Qu.:1.250    1st Qu.:0.7375   1st Qu.:3.350   1st Qu.:2.288  
##  Median :1.700    Median :1.0750   Median :4.025   Median :2.500  
##  Mean   :1.758    Mean   :1.1820   Mean   :3.947   Mean   :2.624  
##  3rd Qu.:2.300    3rd Qu.:1.6125   3rd Qu.:4.550   3rd Qu.:3.000  
##  Max.   :3.050    Max.   :2.7000   Max.   :5.000   Max.   :4.100  
##  ValorEducativo  ServicioRetorno TamanoPaquete   Calidad.Producto
##  Min.   :0.700   Min.   :1.100   Min.   :1.850   Min.   :1.600   
##  1st Qu.:2.400   1st Qu.:2.200   1st Qu.:2.900   1st Qu.:2.050   
##  Median :3.000   Median :2.600   Median :3.575   Median :2.425   
##  Mean   :2.916   Mean   :2.665   Mean   :3.486   Mean   :2.385   
##  3rd Qu.:3.425   3rd Qu.:3.000   3rd Qu.:4.162   3rd Qu.:2.700   
##  Max.   :4.600   Max.   :4.600   Max.   :5.000   Max.   :3.400   
##  NumeroEstrellas
##  Min.   :1.000  
##  1st Qu.:2.400  
##  Median :3.150  
##  Mean   :3.110  
##  3rd Qu.:3.825  
##  Max.   :5.000
mean(algoritmos_recomendacion$VelocidadEntrega)
## [1] 1.7575
sd(algoritmos_recomendacion$VelocidadEntrega)
## [1] 0.6603632

Punto 7 Otro ejemplo

datos2 <- read.csv('SAheart.csv', header=TRUE, sep=';',dec=',')
datos2
##     sbp tobacco   ldl adiposity famhist typea obesity alcohol age chd
## 1   160   12.00  5.73     23.11 Present    49   25.30   97.20  52  Si
## 2   144    0.01  4.41     28.61  Absent    55   28.87    2.06  63  Si
## 3   118    0.08  3.48     32.28 Present    52   29.14    3.81  46  No
## 4   170    7.50  6.41     38.03 Present    51   31.99   24.26  58  Si
## 5   134   13.60  3.50     27.78 Present    60   25.99   57.34  49  Si
## 6   132    6.20  6.47     36.21 Present    62   30.77   14.14  45  No
## 7   142    4.05  3.38     16.20  Absent    59   20.81    2.62  38  No
## 8   114    4.08  4.59     14.60 Present    62   23.11    6.72  58  Si
## 9   114    0.00  3.83     19.40 Present    49   24.86    2.49  29  No
## 10  132    0.00  5.80     30.96 Present    69   30.11    0.00  53  Si
## 11  206    6.00  2.95     32.27  Absent    72   26.81   56.06  60  Si
## 12  134   14.10  4.44     22.39 Present    65   23.09    0.00  40  Si
## 13  118    0.00  1.88     10.05  Absent    59   21.57    0.00  17  No
## 14  132    0.00  1.87     17.21  Absent    49   23.63    0.97  15  No
## 15  112    9.65  2.29     17.20 Present    54   23.53    0.68  53  No
## 16  117    1.53  2.44     28.95 Present    35   25.89   30.03  46  No
## 17  120    7.50 15.33     22.00  Absent    60   25.31   34.49  49  No
## 18  146   10.50  8.29     35.36 Present    78   32.73   13.89  53  Si
## 19  158    2.60  7.46     34.07 Present    61   29.30   53.28  62  Si
## 20  124   14.00  6.23     35.96 Present    45   30.09    0.00  59  Si
## 21  106    1.61  1.74     12.32  Absent    74   20.92   13.37  20  Si
## 22  132    7.90  2.85     26.50 Present    51   26.16   25.71  44  No
## 23  150    0.30  6.38     33.99 Present    62   24.64    0.00  50  No
## 24  138    0.60  3.81     28.66  Absent    54   28.70    1.46  58  No
## 25  142   18.20  4.34     24.38  Absent    61   26.19    0.00  50  No
## 26  124    4.00 12.42     31.29 Present    54   23.23    2.06  42  Si
## 27  118    6.00  9.65     33.91  Absent    60   38.80    0.00  48  No
## 28  145    9.10  5.24     27.55  Absent    59   20.96   21.60  61  Si
## 29  144    4.09  5.55     31.40 Present    60   29.43    5.55  56  No
## 30  146    0.00  6.62     25.69  Absent    60   28.07    8.23  63  Si
## 31  136    2.52  3.95     25.63  Absent    51   21.86    0.00  45  Si
## 32  158    1.02  6.33     23.88  Absent    66   22.13   24.99  46  Si
## 33  122    6.60  5.58     35.95 Present    53   28.07   12.55  59  Si
## 34  126    8.75  6.53     34.02  Absent    49   30.25    0.00  41  Si
## 35  148    5.50  7.10     25.31  Absent    56   29.84    3.60  48  No
## 36  122    4.26  4.44     13.04  Absent    57   19.49   48.99  28  Si
## 37  140    3.90  7.32     25.05  Absent    47   27.36   36.77  32  No
## 38  110    4.64  4.55     30.46  Absent    48   30.90   15.22  46  No
## 39  130    0.00  2.82     19.63 Present    70   24.86    0.00  29  No
## 40  136   11.20  5.81     31.85 Present    75   27.68   22.94  58  Si
## 41  118    0.28  5.80     33.70 Present    60   30.98    0.00  41  Si
## 42  144    0.04  3.38     23.61  Absent    30   23.75    4.66  30  No
## 43  120    0.00  1.07     16.02  Absent    47   22.15    0.00  15  No
## 44  130    2.61  2.72     22.99 Present    51   26.29   13.37  51  Si
## 45  114    0.00  2.99      9.74  Absent    54   46.58    0.00  17  No
## 46  128    4.65  3.31     22.74  Absent    62   22.95    0.51  48  No
## 47  162    7.40  8.55     24.65 Present    64   25.71    5.86  58  Si
## 48  116    1.91  7.56     26.45 Present    52   30.01    3.60  33  Si
## 49  114    0.00  1.94     11.02  Absent    54   20.17   38.98  16  No
## 50  126    3.80  3.88     31.79  Absent    57   30.53    0.00  30  No
## 51  122    0.00  5.75     30.90 Present    46   29.01    4.11  42  No
## 52  134    2.50  3.66     30.90  Absent    52   27.19   23.66  49  No
## 53  152    0.90  9.12     30.23  Absent    56   28.64    0.37  42  Si
## 54  134    8.08  1.55     17.50 Present    56   22.65   66.65  31  Si
## 55  156    3.00  1.82     27.55  Absent    60   23.91   54.00  53  No
## 56  152    5.99  7.99     32.48  Absent    45   26.57  100.32  48  No
## 57  118    0.00  2.99     16.17  Absent    49   23.83    3.22  28  No
## 58  126    5.10  2.96     26.50  Absent    55   25.52   12.34  38  Si
## 59  103    0.03  4.21     18.96  Absent    48   22.94    2.62  18  No
## 60  121    0.80  5.29     18.95 Present    47   22.51    0.00  61  No
## 61  142    0.28  1.80     21.03  Absent    57   23.65    2.93  33  No
## 62  138    1.15  5.09     27.87 Present    61   25.65    2.34  44  No
## 63  152   10.10  4.71     24.65 Present    65   26.21   24.53  57  No
## 64  140    0.45  4.30     24.33  Absent    41   27.23   10.08  38  No
## 65  130    0.00  1.82     10.45  Absent    57   22.07    2.06  17  No
## 66  136    7.36  2.19     28.11 Present    61   25.00   61.71  54  No
## 67  124    4.82  3.24     21.10 Present    48   28.49    8.42  30  No
## 68  112    0.41  1.88     10.29  Absent    39   22.08   20.98  27  No
## 69  118    4.46  7.27     29.13 Present    48   29.01   11.11  33  No
## 70  122    0.00  3.37     16.10  Absent    67   21.06    0.00  32  Si
## 71  118    0.00  3.67     12.13  Absent    51   19.15    0.60  15  No
## 72  130    1.72  2.66     10.38  Absent    68   17.81   11.10  26  No
## 73  130    5.60  3.37     24.80  Absent    58   25.76   43.20  36  No
## 74  126    0.09  5.03     13.27 Present    50   17.75    4.63  20  No
## 75  128    0.40  6.17     26.35  Absent    64   27.86   11.11  34  No
## 76  136    0.00  4.12     17.42  Absent    52   21.66   12.86  40  No
## 77  134    0.00  5.90     30.84  Absent    49   29.16    0.00  55  No
## 78  140    0.60  5.56     33.39 Present    58   27.19    0.00  55  Si
## 79  168    4.50  6.68     28.47  Absent    43   24.25   24.38  56  Si
## 80  108    0.40  5.91     22.92 Present    57   25.72   72.00  39  No
## 81  114    3.00  7.04     22.64 Present    55   22.59    0.00  45  Si
## 82  140    8.14  4.93     42.49  Absent    53   45.72    6.43  53  Si
## 83  148    4.80  6.09     36.55 Present    63   25.44    0.88  55  Si
## 84  148   12.20  3.79     34.15  Absent    57   26.38   14.40  57  Si
## 85  128    0.00  2.43     13.15 Present    63   20.75    0.00  17  No
## 86  130    0.56  3.30     30.86  Absent    49   27.52   33.33  45  No
## 87  126   10.50  4.49     17.33  Absent    67   19.37    0.00  49  Si
## 88  140    0.00  5.08     27.33 Present    41   27.83    1.25  38  No
## 89  126    0.90  5.64     17.78 Present    55   21.94    0.00  41  No
## 90  122    0.72  4.04     32.38  Absent    34   28.34    0.00  55  No
## 91  116    1.03  2.83     10.85  Absent    45   21.59    1.75  21  No
## 92  120    3.70  4.02     39.66  Absent    61   30.57    0.00  64  Si
## 93  143    0.46  2.40     22.87  Absent    62   29.17   15.43  29  No
## 94  118    4.00  3.95     18.96  Absent    54   25.15    8.33  49  Si
## 95  194    1.70  6.32     33.67  Absent    47   30.16    0.19  56  No
## 96  134    3.00  4.37     23.07  Absent    56   20.54    9.65  62  No
## 97  138    2.16  4.90     24.83 Present    39   26.06   28.29  29  No
## 98  136    0.00  5.00     27.58 Present    49   27.59    1.47  39  No
## 99  122    3.20 11.32     35.36 Present    55   27.07    0.00  51  Si
## 100 164   12.00  3.91     19.59  Absent    51   23.44   19.75  39  No
## 101 136    8.00  7.85     23.81 Present    51   22.69    2.78  50  No
## 102 166    0.07  4.03     29.29  Absent    53   28.37    0.00  27  No
## 103 118    0.00  4.34     30.12 Present    52   32.18    3.91  46  No
## 104 128    0.42  4.60     26.68  Absent    41   30.97   10.33  31  No
## 105 118    1.50  5.38     25.84  Absent    64   28.63    3.89  29  No
## 106 158    3.60  2.97     30.11  Absent    63   26.64  108.00  64  No
## 107 108    1.50  4.33     24.99  Absent    66   22.29   21.60  61  Si
## 108 170    7.60  5.50     37.83 Present    42   37.41    6.17  54  Si
## 109 118    1.00  5.76     22.10  Absent    62   23.48    7.71  42  No
## 110 124    0.00  3.04     17.33  Absent    49   22.04    0.00  18  No
## 111 114    0.00  8.01     21.64  Absent    66   25.51    2.49  16  No
## 112 168    9.00  8.53     24.48 Present    69   26.18    4.63  54  Si
## 113 134    2.00  3.66     14.69  Absent    52   21.03    2.06  37  No
## 114 174    0.00  8.46     35.10 Present    35   25.27    0.00  61  Si
## 115 116   31.20  3.17     14.99  Absent    47   19.40   49.06  59  Si
## 116 128    0.00 10.58     31.81 Present    46   28.41   14.66  48  No
## 117 140    4.50  4.59     18.01  Absent    63   21.91   22.09  32  Si
## 118 154    0.70  5.91     25.00  Absent    13   20.60    0.00  42  No
## 119 150    3.50  6.99     25.39 Present    50   23.35   23.48  61  Si
## 120 130    0.00  3.92     25.55  Absent    68   28.02    0.68  27  No
## 121 128    2.00  6.13     21.31  Absent    66   22.86   11.83  60  No
## 122 120    1.40  6.25     20.47  Absent    60   25.85    8.51  28  No
## 123 120    0.00  5.01     26.13  Absent    64   26.21   12.24  33  No
## 124 138    4.50  2.85     30.11  Absent    55   24.78   24.89  56  Si
## 125 153    7.80  3.96     25.73  Absent    54   25.91   27.03  45  No
## 126 123    8.60 11.17     35.28 Present    70   33.14    0.00  59  Si
## 127 148    4.04  3.99     20.69  Absent    60   27.78    1.75  28  No
## 128 136    3.96  2.76     30.28 Present    50   34.42   18.51  38  No
## 129 134    8.80  7.41     26.84  Absent    35   29.44   29.52  60  Si
## 130 152   12.18  4.04     37.83 Present    63   34.57    4.17  64  No
## 131 158   13.50  5.04     30.79  Absent    54   24.79   21.50  62  No
## 132 132    2.00  3.08     35.39  Absent    45   31.44   79.82  58  Si
## 133 134    1.50  3.73     21.53  Absent    41   24.70   11.11  30  Si
## 134 142    7.44  5.52     33.97  Absent    47   29.29   24.27  54  No
## 135 134    6.00  3.30     28.45  Absent    65   26.09   58.11  40  No
## 136 122    4.18  9.05     29.27 Present    44   24.05   19.34  52  Si
## 137 116    2.70  3.69     13.52  Absent    55   21.13   18.51  32  No
## 138 128    0.50  3.70     12.81 Present    66   21.25   22.73  28  No
## 139 120    0.00  3.68     12.24  Absent    51   20.52    0.51  20  No
## 140 124    0.00  3.95     36.35 Present    59   32.83    9.59  54  No
## 141 160   14.00  5.90     37.12  Absent    58   33.87    3.52  54  Si
## 142 130    2.78  4.89      9.39 Present    63   19.30   17.47  25  Si
## 143 128    2.80  5.53     14.29  Absent    64   24.97    0.51  38  No
## 144 130    4.50  5.86     37.43  Absent    61   31.21   32.30  58  No
## 145 109    1.20  6.14     29.26  Absent    47   24.72   10.46  40  No
## 146 144    0.00  3.84     18.72  Absent    56   22.10    4.80  40  No
## 147 118    1.05  3.16     12.98 Present    46   22.09   16.35  31  No
## 148 136    3.46  6.38     32.25 Present    43   28.73    3.13  43  Si
## 149 136    1.50  6.06     26.54  Absent    54   29.38   14.50  33  Si
## 150 124   15.50  5.05     24.06  Absent    46   23.22    0.00  61  Si
## 151 148    6.00  6.49     26.47  Absent    48   24.70    0.00  55  No
## 152 128    6.60  3.58     20.71  Absent    55   24.15    0.00  52  No
## 153 122    0.28  4.19     19.97  Absent    61   25.63    0.00  24  No
## 154 108    0.00  2.74     11.17  Absent    53   22.61    0.95  20  No
## 155 124    3.04  4.80     19.52 Present    60   21.78  147.19  41  Si
## 156 138    8.80  3.12     22.41 Present    63   23.33  120.03  55  Si
## 157 127    0.00  2.81     15.70  Absent    42   22.03    1.03  17  No
## 158 174    9.45  5.13     35.54  Absent    55   30.71   59.79  53  No
## 159 122    0.00  3.05     23.51  Absent    46   25.81    0.00  38  No
## 160 144    6.75  5.45     29.81  Absent    53   25.62   26.23  43  Si
## 161 126    1.80  6.22     19.71  Absent    65   24.81    0.69  31  No
## 162 208   27.40  3.12     26.63  Absent    66   27.45   33.07  62  Si
## 163 138    0.00  2.68     17.04  Absent    42   22.16    0.00  16  No
## 164 148    0.00  3.84     17.26  Absent    70   20.00    0.00  21  No
## 165 122    0.00  3.08     16.30  Absent    43   22.13    0.00  16  No
## 166 132    7.00  3.20     23.26  Absent    77   23.64   23.14  49  No
## 167 110   12.16  4.99     28.56  Absent    44   27.14   21.60  55  Si
## 168 160    1.52  8.12     29.30 Present    54   25.87   12.86  43  Si
## 169 126    0.54  4.39     21.13 Present    45   25.99    0.00  25  No
## 170 162    5.30  7.95     33.58 Present    58   36.06    8.23  48  No
## 171 194    2.55  6.89     33.88 Present    69   29.33    0.00  41  No
## 172 118    0.75  2.58     20.25  Absent    59   24.46    0.00  32  No
## 173 124    0.00  4.79     34.71  Absent    49   26.09    9.26  47  No
## 174 160    0.00  2.42     34.46  Absent    48   29.83    1.03  61  No
## 175 128    0.00  2.51     29.35 Present    53   22.05    1.37  62  No
## 176 122    4.00  5.24     27.89 Present    45   26.52    0.00  61  Si
## 177 132    2.00  2.70     21.57 Present    50   27.95    9.26  37  No
## 178 120    0.00  2.42     16.66  Absent    46   20.16    0.00  17  No
## 179 128    0.04  8.22     28.17  Absent    65   26.24   11.73  24  No
## 180 108   15.00  4.91     34.65  Absent    41   27.96   14.40  56  No
## 181 166    0.00  4.31     34.27  Absent    45   30.14   13.27  56  No
## 182 152    0.00  6.06     41.05 Present    51   40.34    0.00  51  No
## 183 170    4.20  4.67     35.45 Present    50   27.14    7.92  60  Si
## 184 156    4.00  2.05     19.48 Present    50   21.48   27.77  39  Si
## 185 116    8.00  6.73     28.81 Present    41   26.74   40.94  48  Si
## 186 122    4.40  3.18     11.59 Present    59   21.94    0.00  33  Si
## 187 150   20.00  6.40     35.04  Absent    53   28.88    8.33  63  No
## 188 129    2.15  5.17     27.57  Absent    52   25.42    2.06  39  No
## 189 134    4.80  6.58     29.89 Present    55   24.73   23.66  63  No
## 190 126    0.00  5.98     29.06 Present    56   25.39   11.52  64  Si
## 191 142    0.00  3.72     25.68  Absent    48   24.37    5.25  40  Si
## 192 128    0.70  4.90     37.42 Present    72   35.94    3.09  49  Si
## 193 102    0.40  3.41     17.22 Present    56   23.59    2.06  39  Si
## 194 130    0.00  4.89     25.98  Absent    72   30.42   14.71  23  No
## 195 138    0.05  2.79     10.35  Absent    46   21.62    0.00  18  No
## 196 138    0.00  1.96     11.82 Present    54   22.01    8.13  21  No
## 197 128    0.00  3.09     20.57  Absent    54   25.63    0.51  17  No
## 198 162    2.92  3.63     31.33  Absent    62   31.59   18.51  42  No
## 199 160    3.00  9.19     26.47 Present    39   28.25   14.40  54  Si
## 200 148    0.00  4.66     24.39  Absent    50   25.26    4.03  27  No
## 201 124    0.16  2.44     16.67  Absent    65   24.58   74.91  23  No
## 202 136    3.15  4.37     20.22 Present    59   25.12   47.16  31  Si
## 203 134    2.75  5.51     26.17  Absent    57   29.87    8.33  33  No
## 204 128    0.73  3.97     23.52  Absent    54   23.81   19.20  64  No
## 205 122    3.20  3.59     22.49 Present    45   24.96   36.17  58  No
## 206 152    3.00  4.64     31.29  Absent    41   29.34    4.53  40  No
## 207 162    0.00  5.09     24.60 Present    64   26.71    3.81  18  No
## 208 124    4.00  6.65     30.84 Present    54   28.40   33.51  60  No
## 209 136    5.80  5.90     27.55  Absent    65   25.71   14.40  59  No
## 210 136    8.80  4.26     32.03 Present    52   31.44   34.35  60  No
## 211 134    0.05  8.03     27.95  Absent    48   26.88    0.00  60  No
## 212 122    1.00  5.88     34.81 Present    69   31.27   15.94  40  Si
## 213 116    3.00  3.05     30.31  Absent    41   23.63    0.86  44  No
## 214 132    0.00  0.98     21.39  Absent    62   26.75    0.00  53  No
## 215 134    0.00  2.40     21.11  Absent    57   22.45    1.37  18  No
## 216 160    7.77  8.07     34.80  Absent    64   31.15    0.00  62  Si
## 217 180    0.52  4.23     16.38  Absent    55   22.56   14.77  45  Si
## 218 124    0.81  6.16     11.61  Absent    35   21.47   10.49  26  No
## 219 114    0.00  4.97      9.69  Absent    26   22.60    0.00  25  No
## 220 208    7.40  7.41     32.03  Absent    50   27.62    7.85  57  No
## 221 138    0.00  3.14     12.00  Absent    54   20.28    0.00  16  No
## 222 164    0.50  6.95     39.64 Present    47   41.76    3.81  46  Si
## 223 144    2.40  8.13     35.61  Absent    46   27.38   13.37  60  No
## 224 136    7.50  7.39     28.04 Present    50   25.01    0.00  45  Si
## 225 132    7.28  3.52     12.33  Absent    60   19.48    2.06  56  No
## 226 143    5.04  4.86     23.59  Absent    58   24.69   18.72  42  No
## 227 112    4.46  7.18     26.25 Present    69   27.29    0.00  32  Si
## 228 134   10.00  3.79     34.72  Absent    42   28.33   28.80  52  Si
## 229 138    2.00  5.11     31.40 Present    49   27.25    2.06  64  Si
## 230 188    0.00  5.47     32.44 Present    71   28.99    7.41  50  Si
## 231 110    2.35  3.36     26.72 Present    54   26.08  109.80  58  Si
## 232 136   13.20  7.18     35.95  Absent    48   29.19    0.00  62  No
## 233 130    1.75  5.46     34.34  Absent    53   29.42    0.00  58  Si
## 234 122    0.00  3.76     24.59  Absent    56   24.36    0.00  30  No
## 235 138    0.00  3.24     27.68  Absent    60   25.70   88.66  29  No
## 236 130   18.00  4.13     27.43  Absent    54   27.44    0.00  51  Si
## 237 126    5.50  3.78     34.15  Absent    55   28.85    3.18  61  No
## 238 176    5.76  4.89     26.10 Present    46   27.30   19.44  57  No
## 239 122    0.00  5.49     19.56  Absent    57   23.12   14.02  27  No
## 240 124    0.00  3.23      9.64  Absent    59   22.70    0.00  16  No
## 241 140    5.20  3.58     29.26  Absent    70   27.29   20.17  45  Si
## 242 128    6.00  4.37     22.98 Present    50   26.01    0.00  47  No
## 243 190    4.18  5.05     24.83  Absent    45   26.09   82.85  41  No
## 244 144    0.76 10.53     35.66  Absent    63   34.35    0.00  55  Si
## 245 126    4.60  7.40     31.99 Present    57   28.67    0.37  60  Si
## 246 128    0.00  2.63     23.88  Absent    45   21.59    6.54  57  No
## 247 136    0.40  3.91     21.10 Present    63   22.30    0.00  56  Si
## 248 158    4.00  4.18     28.61 Present    42   25.11    0.00  60  No
## 249 160    0.60  6.94     30.53  Absent    36   25.68    1.42  64  No
## 250 124    6.00  5.21     33.02 Present    64   29.37    7.61  58  Si
## 251 158    6.17  8.12     30.75  Absent    46   27.84   92.62  48  No
## 252 128    0.00  6.34     11.87  Absent    57   23.14    0.00  17  No
## 253 166    3.00  3.82     26.75  Absent    45   20.86    0.00  63  Si
## 254 146    7.50  7.21     25.93 Present    55   22.51    0.51  42  No
## 255 161    9.00  4.65     15.16 Present    58   23.76   43.20  46  No
## 256 164   13.02  6.26     29.38 Present    47   22.75   37.03  54  Si
## 257 146    5.08  7.03     27.41 Present    63   36.46   24.48  37  Si
## 258 142    4.48  3.57     19.75 Present    51   23.54    3.29  49  No
## 259 138   12.00  5.13     28.34  Absent    59   24.49   32.81  58  Si
## 260 154    1.80  7.13     34.04 Present    52   35.51   39.36  44  No
## 261 118    0.00  2.39     12.13  Absent    49   18.46    0.26  17  Si
## 262 124    0.61  2.69     17.15 Present    61   22.76   11.55  20  No
## 263 124    1.04  2.84     16.42 Present    46   20.17    0.00  61  No
## 264 136    5.00  4.19     23.99 Present    68   27.80   25.86  35  No
## 265 132    9.90  4.63     27.86 Present    46   23.39    0.51  52  Si
## 266 118    0.12  1.96     20.31  Absent    37   20.01    2.42  18  No
## 267 118    0.12  4.16      9.37  Absent    57   19.61    0.00  17  No
## 268 134   12.00  4.96     29.79  Absent    53   24.86    8.23  57  No
## 269 114    0.10  3.95     15.89 Present    57   20.31   17.14  16  No
## 270 136    6.80  7.84     30.74 Present    58   26.20   23.66  45  Si
## 271 130    0.00  4.16     39.43 Present    46   30.01    0.00  55  Si
## 272 136    2.20  4.16     38.02  Absent    65   37.24    4.11  41  Si
## 273 136    1.36  3.16     14.97 Present    56   24.98    7.30  24  No
## 274 154    4.20  5.59     25.02  Absent    58   25.02    1.54  43  No
## 275 108    0.80  2.47     17.53  Absent    47   22.18    0.00  55  Si
## 276 136    8.80  4.69     36.07 Present    38   26.56    2.78  63  Si
## 277 174    2.02  6.57     31.90 Present    50   28.75   11.83  64  Si
## 278 124    4.25  8.22     30.77  Absent    56   25.80    0.00  43  No
## 279 114    0.00  2.63      9.69  Absent    45   17.89    0.00  16  No
## 280 118    0.12  3.26     12.26  Absent    55   22.65    0.00  16  No
## 281 106    1.08  4.37     26.08  Absent    67   24.07   17.74  28  Si
## 282 146    3.60  3.51     22.67  Absent    51   22.29   43.71  42  No
## 283 206    0.00  4.17     33.23  Absent    69   27.36    6.17  50  Si
## 284 134    3.00  3.17     17.91  Absent    35   26.37   15.12  27  No
## 285 148   15.00  4.98     36.94 Present    72   31.83   66.27  41  Si
## 286 126    0.21  3.95     15.11  Absent    61   22.17    2.42  17  No
## 287 134    0.00  3.69     13.92  Absent    43   27.66    0.00  19  No
## 288 134    0.02  2.80     18.84  Absent    45   24.82    0.00  17  No
## 289 123    0.05  4.61     13.69  Absent    51   23.23    2.78  16  No
## 290 112    0.60  5.28     25.71  Absent    55   27.02   27.77  38  Si
## 291 112    0.00  1.71     15.96  Absent    42   22.03    3.50  16  No
## 292 101    0.48  7.26     13.00  Absent    50   19.82    5.19  16  No
## 293 150    0.18  4.14     14.40  Absent    53   23.43    7.71  44  No
## 294 170    2.60  7.22     28.69 Present    71   27.87   37.65  56  Si
## 295 134    0.00  5.63     29.12  Absent    68   32.33    2.02  34  No
## 296 142    0.00  4.19     18.04  Absent    56   23.65   20.78  42  Si
## 297 132    0.10  3.28     10.73  Absent    73   20.42    0.00  17  No
## 298 136    0.00  2.28     18.14  Absent    55   22.59    0.00  17  No
## 299 132   12.00  4.51     21.93  Absent    61   26.07   64.80  46  Si
## 300 166    4.10  4.00     34.30 Present    32   29.51    8.23  53  No
## 301 138    0.00  3.96     24.70 Present    53   23.80    0.00  45  No
## 302 138    2.27  6.41     29.07  Absent    58   30.22    2.93  32  Si
## 303 170    0.00  3.12     37.15  Absent    47   35.42    0.00  53  No
## 304 128    0.00  8.41     28.82 Present    60   26.86    0.00  59  Si
## 305 136    1.20  2.78      7.12  Absent    52   22.51    3.41  27  No
## 306 128    0.00  3.22     26.55 Present    39   26.59   16.71  49  No
## 307 150   14.40  5.04     26.52 Present    60   28.84    0.00  45  No
## 308 132    8.40  3.57     13.68  Absent    42   18.75   15.43  59  Si
## 309 142    2.40  2.55     23.89  Absent    54   26.09   59.14  37  No
## 310 130    0.05  2.44     28.25 Present    67   30.86   40.32  34  No
## 311 174    3.50  5.26     21.97 Present    36   22.04    8.33  59  Si
## 312 114    9.60  2.51     29.18  Absent    49   25.67   40.63  46  No
## 313 162    1.50  2.46     19.39 Present    49   24.32    0.00  59  Si
## 314 174    0.00  3.27     35.40  Absent    58   37.71   24.95  44  No
## 315 190    5.15  6.03     36.59  Absent    42   30.31   72.00  50  No
## 316 154    1.40  1.72     18.86  Absent    58   22.67   43.20  59  No
## 317 124    0.00  2.28     24.86 Present    50   22.24    8.26  38  No
## 318 114    1.20  3.98     14.90  Absent    49   23.79   25.82  26  No
## 319 168   11.40  5.08     26.66 Present    56   27.04    2.61  59  Si
## 320 142    3.72  4.24     32.57  Absent    52   24.98    7.61  51  No
## 321 154    0.00  4.81     28.11 Present    56   25.67   75.77  59  No
## 322 146    4.36  4.31     18.44 Present    47   24.72   10.80  38  No
## 323 166    6.00  3.02     29.30  Absent    35   24.38   38.06  61  No
## 324 140    8.60  3.90     32.16 Present    52   28.51   11.11  64  Si
## 325 136    1.70  3.53     20.13  Absent    56   19.44   14.40  55  No
## 326 156    0.00  3.47     21.10  Absent    73   28.40    0.00  36  Si
## 327 132    0.00  6.63     29.58 Present    37   29.41    2.57  62  No
## 328 128    0.00  2.98     12.59  Absent    65   20.74    2.06  19  No
## 329 106    5.60  3.20     12.30  Absent    49   20.29    0.00  39  No
## 330 144    0.40  4.64     30.09  Absent    30   27.39    0.74  55  No
## 331 154    0.31  2.33     16.48  Absent    33   24.00   11.83  17  No
## 332 126    3.10  2.01     32.97 Present    56   28.63   26.74  45  No
## 333 134    6.40  8.49     37.25 Present    56   28.94   10.49  51  Si
## 334 152   19.45  4.22     29.81  Absent    28   23.95    0.00  59  Si
## 335 146    1.35  6.39     34.21  Absent    51   26.43    0.00  59  Si
## 336 162    6.94  4.55     33.36 Present    52   27.09   32.06  43  No
## 337 130    7.28  3.56     23.29 Present    20   26.80   51.87  58  Si
## 338 138    6.00  7.24     37.05  Absent    38   28.69    0.00  59  No
## 339 148    0.00  5.32     26.71 Present    52   32.21   32.78  27  No
## 340 124    4.20  2.94     27.59  Absent    50   30.31   85.06  30  No
## 341 118    1.62  9.01     21.70  Absent    59   25.89   21.19  40  No
## 342 116    4.28  7.02     19.99 Present    68   23.31    0.00  52  Si
## 343 162    6.30  5.73     22.61 Present    46   20.43   62.54  53  Si
## 344 138    0.87  1.87     15.89  Absent    44   26.76   42.99  31  No
## 345 137    1.20  3.14     23.87  Absent    66   24.13   45.00  37  No
## 346 198    0.52 11.89     27.68 Present    48   28.40   78.99  26  Si
## 347 154    4.50  4.75     23.52 Present    43   25.76    0.00  53  Si
## 348 128    5.40  2.36     12.98  Absent    51   18.36    6.69  61  No
## 349 130    0.08  5.59     25.42 Present    50   24.98    6.27  43  Si
## 350 162    5.60  4.24     22.53  Absent    29   22.91    5.66  60  No
## 351 120   10.50  2.70     29.87 Present    54   24.50   16.46  49  No
## 352 136    3.99  2.58     16.38 Present    53   22.41   27.67  36  No
## 353 176    1.20  8.28     36.16 Present    42   27.81   11.60  58  Si
## 354 134   11.79  4.01     26.57 Present    38   21.79   38.88  61  Si
## 355 122    1.70  5.28     32.23 Present    51   24.08    0.00  54  No
## 356 134    0.90  3.18     23.66 Present    52   23.26   27.36  58  Si
## 357 134    0.00  2.43     22.24  Absent    52   26.49   41.66  24  No
## 358 136    6.60  6.08     32.74  Absent    64   33.28    2.72  49  No
## 359 132    4.05  5.15     26.51 Present    31   26.67   16.30  50  No
## 360 152    1.68  3.58     25.43  Absent    50   27.03    0.00  32  No
## 361 132   12.30  5.96     32.79 Present    57   30.12   21.50  62  Si
## 362 124    0.40  3.67     25.76  Absent    43   28.08   20.57  34  No
## 363 140    4.20  2.91     28.83 Present    43   24.70   47.52  48  No
## 364 166    0.60  2.42     34.03 Present    53   26.96   54.00  60  No
## 365 156    3.02  5.35     25.72 Present    53   25.22   28.11  52  Si
## 366 132    0.72  4.37     19.54  Absent    48   26.11   49.37  28  No
## 367 150    0.00  4.99     27.73  Absent    57   30.92    8.33  24  No
## 368 134    0.12  3.40     21.18 Present    33   26.27   14.21  30  No
## 369 126    3.40  4.87     15.16 Present    65   22.01   11.11  38  No
## 370 148    0.50  5.97     32.88  Absent    54   29.27    6.43  42  No
## 371 148    8.20  7.75     34.46 Present    46   26.53    6.04  64  Si
## 372 132    6.00  5.97     25.73 Present    66   24.18  145.29  41  No
## 373 128    1.60  5.41     29.30  Absent    68   29.38   23.97  32  No
## 374 128    5.16  4.90     31.35 Present    57   26.42    0.00  64  No
## 375 140    0.00  2.40     27.89 Present    70   30.74  144.00  29  No
## 376 126    0.00  5.29     27.64  Absent    25   27.62    2.06  45  No
## 377 114    3.60  4.16     22.58  Absent    60   24.49   65.31  31  No
## 378 118    1.25  4.69     31.58 Present    52   27.16    4.11  53  No
## 379 126    0.96  4.99     29.74  Absent    66   33.35   58.32  38  No
## 380 154    4.50  4.68     39.97  Absent    61   33.17    1.54  64  Si
## 381 112    1.44  2.71     22.92  Absent    59   24.81    0.00  52  No
## 382 140    8.00  4.42     33.15 Present    47   32.77   66.86  44  No
## 383 140    1.68 11.41     29.54 Present    74   30.75    2.06  38  Si
## 384 128    2.60  4.94     21.36  Absent    61   21.30    0.00  31  No
## 385 126   19.60  6.03     34.99  Absent    49   26.99   55.89  44  No
## 386 160    4.20  6.76     37.99 Present    61   32.91    3.09  54  Si
## 387 144    0.00  4.17     29.63 Present    52   21.83    0.00  59  No
## 388 148    4.50 10.49     33.27  Absent    50   25.92    2.06  53  Si
## 389 146    0.00  4.92     18.53  Absent    57   24.20   34.97  26  No
## 390 164    5.60  3.17     30.98 Present    44   25.99   43.20  53  Si
## 391 130    0.54  3.63     22.03 Present    69   24.34   12.86  39  Si
## 392 154    2.40  5.63     42.17 Present    59   35.07   12.86  50  Si
## 393 178    0.95  4.75     21.06  Absent    49   23.74   24.69  61  No
## 394 180    3.57  3.57     36.10  Absent    36   26.70   19.95  64  No
## 395 134   12.50  2.73     39.35  Absent    48   35.58    0.00  48  No
## 396 142    0.00  3.54     16.64  Absent    58   25.97    8.36  27  No
## 397 162    7.00  7.67     34.34 Present    33   30.77    0.00  62  No
## 398 218   11.20  2.77     30.79  Absent    38   24.86   90.93  48  Si
## 399 126    8.75  6.06     32.72 Present    33   27.00   62.43  55  Si
## 400 126    0.00  3.57     26.01  Absent    61   26.30    7.97  47  No
## 401 134    6.10  4.77     26.08  Absent    47   23.82    1.03  49  No
## 402 132    0.00  4.17     36.57  Absent    57   30.61   18.00  49  No
## 403 178    5.50  3.79     23.92 Present    45   21.26    6.17  62  Si
## 404 208    5.04  5.19     20.71 Present    52   25.12   24.27  58  Si
## 405 160    1.15 10.19     39.71  Absent    31   31.65   20.52  57  No
## 406 116    2.38  5.67     29.01 Present    54   27.26   15.77  51  No
## 407 180   25.01  3.70     38.11 Present    57   30.54    0.00  61  Si
## 408 200   19.20  4.43     40.60 Present    55   32.04   36.00  60  Si
## 409 112    4.20  3.58     27.14  Absent    52   26.83    2.06  40  No
## 410 120    0.00  3.10     26.97  Absent    41   24.80    0.00  16  No
## 411 178   20.00  9.78     33.55  Absent    37   27.29    2.88  62  Si
## 412 166    0.80  5.63     36.21  Absent    50   34.72   28.80  60  No
## 413 164    8.20 14.16     36.85  Absent    52   28.50   17.02  55  Si
## 414 216    0.92  2.66     19.85 Present    49   20.58    0.51  63  Si
## 415 146    6.40  5.62     33.05 Present    57   31.03    0.74  46  No
## 416 134    1.10  3.54     20.41 Present    58   24.54   39.91  39  Si
## 417 158   16.00  5.56     29.35  Absent    36   25.92   58.32  60  No
## 418 176    0.00  3.14     31.04 Present    45   30.18    4.63  45  No
## 419 132    2.80  4.79     20.47 Present    50   22.15   11.73  48  No
## 420 126    0.00  4.55     29.18  Absent    48   24.94   36.00  41  No
## 421 120    5.50  3.51     23.23  Absent    46   22.40   90.31  43  No
## 422 174    0.00  3.86     21.73  Absent    42   23.37    0.00  63  No
## 423 150   13.80  5.10     29.45 Present    52   27.92   77.76  55  Si
## 424 176    6.00  3.98     17.20 Present    52   21.07    4.11  61  Si
## 425 142    2.20  3.29     22.70  Absent    44   23.66    5.66  42  Si
## 426 132    0.00  3.30     21.61  Absent    42   24.92   32.61  33  No
## 427 142    1.32  7.63     29.98 Present    57   31.16   72.93  33  No
## 428 146    1.16  2.28     34.53  Absent    50   28.71   45.00  49  No
## 429 132    7.20  3.65     17.16 Present    56   23.25    0.00  34  No
## 430 120    0.00  3.57     23.22  Absent    58   27.20    0.00  32  No
## 431 118    0.00  3.89     15.96  Absent    65   20.18    0.00  16  No
## 432 108    0.00  1.43     26.26  Absent    42   19.38    0.00  16  No
## 433 136    0.00  4.00     19.06  Absent    40   21.94    2.06  16  No
## 434 120    0.00  2.46     13.39  Absent    47   22.01    0.51  18  No
## 435 132    0.00  3.55      8.66 Present    61   18.50    3.87  16  No
## 436 136    0.00  1.77     20.37  Absent    45   21.51    2.06  16  No
## 437 138    0.00  1.86     18.35 Present    59   25.38    6.51  17  No
## 438 138    0.06  4.15     20.66  Absent    49   22.59    2.49  16  No
## 439 130    1.22  3.30     13.65  Absent    50   21.40    3.81  31  No
## 440 130    4.00  2.40     17.42  Absent    60   22.05    0.00  40  No
## 441 110    0.00  7.14     28.28  Absent    57   29.00    0.00  32  No
## 442 120    0.00  3.98     13.19 Present    47   21.89    0.00  16  No
## 443 166    6.00  8.80     37.89  Absent    39   28.70   43.20  52  No
## 444 134    0.57  4.75     23.07  Absent    67   26.33    0.00  37  No
## 445 142    3.00  3.69     25.10  Absent    60   30.08   38.88  27  No
## 446 136    2.80  2.53      9.28 Present    61   20.70    4.55  25  No
## 447 142    0.00  4.32     25.22  Absent    47   28.92    6.53  34  Si
## 448 130    0.00  1.88     12.51 Present    52   20.28    0.00  17  No
## 449 124    1.80  3.74     16.64 Present    42   22.26   10.49  20  No
## 450 144    4.00  5.03     25.78 Present    57   27.55   90.00  48  Si
## 451 136    1.81  3.31      6.74  Absent    63   19.57   24.94  24  No
## 452 120    0.00  2.77     13.35  Absent    67   23.37    1.03  18  No
## 453 154    5.53  3.20     28.81 Present    61   26.15   42.79  42  No
## 454 124    1.60  7.22     39.68 Present    36   31.50    0.00  51  Si
## 455 146    0.64  4.82     28.02  Absent    60   28.11    8.23  39  Si
## 456 128    2.24  2.83     26.48  Absent    48   23.96   47.42  27  Si
## 457 170    0.40  4.11     42.06 Present    56   33.10    2.06  57  No
## 458 214    0.40  5.98     31.72  Absent    64   28.45    0.00  58  No
## 459 182    4.20  4.41     32.10  Absent    52   28.61   18.72  52  Si
## 460 108    3.00  1.59     15.23  Absent    40   20.09   26.64  55  No
## 461 118    5.40 11.61     30.79  Absent    64   27.35   23.97  40  No
## 462 132    0.00  4.82     33.41 Present    62   14.70    0.00  46  Si
SAheart <- as.data.frame(datos2)
SAheart
##     sbp tobacco   ldl adiposity famhist typea obesity alcohol age chd
## 1   160   12.00  5.73     23.11 Present    49   25.30   97.20  52  Si
## 2   144    0.01  4.41     28.61  Absent    55   28.87    2.06  63  Si
## 3   118    0.08  3.48     32.28 Present    52   29.14    3.81  46  No
## 4   170    7.50  6.41     38.03 Present    51   31.99   24.26  58  Si
## 5   134   13.60  3.50     27.78 Present    60   25.99   57.34  49  Si
## 6   132    6.20  6.47     36.21 Present    62   30.77   14.14  45  No
## 7   142    4.05  3.38     16.20  Absent    59   20.81    2.62  38  No
## 8   114    4.08  4.59     14.60 Present    62   23.11    6.72  58  Si
## 9   114    0.00  3.83     19.40 Present    49   24.86    2.49  29  No
## 10  132    0.00  5.80     30.96 Present    69   30.11    0.00  53  Si
## 11  206    6.00  2.95     32.27  Absent    72   26.81   56.06  60  Si
## 12  134   14.10  4.44     22.39 Present    65   23.09    0.00  40  Si
## 13  118    0.00  1.88     10.05  Absent    59   21.57    0.00  17  No
## 14  132    0.00  1.87     17.21  Absent    49   23.63    0.97  15  No
## 15  112    9.65  2.29     17.20 Present    54   23.53    0.68  53  No
## 16  117    1.53  2.44     28.95 Present    35   25.89   30.03  46  No
## 17  120    7.50 15.33     22.00  Absent    60   25.31   34.49  49  No
## 18  146   10.50  8.29     35.36 Present    78   32.73   13.89  53  Si
## 19  158    2.60  7.46     34.07 Present    61   29.30   53.28  62  Si
## 20  124   14.00  6.23     35.96 Present    45   30.09    0.00  59  Si
## 21  106    1.61  1.74     12.32  Absent    74   20.92   13.37  20  Si
## 22  132    7.90  2.85     26.50 Present    51   26.16   25.71  44  No
## 23  150    0.30  6.38     33.99 Present    62   24.64    0.00  50  No
## 24  138    0.60  3.81     28.66  Absent    54   28.70    1.46  58  No
## 25  142   18.20  4.34     24.38  Absent    61   26.19    0.00  50  No
## 26  124    4.00 12.42     31.29 Present    54   23.23    2.06  42  Si
## 27  118    6.00  9.65     33.91  Absent    60   38.80    0.00  48  No
## 28  145    9.10  5.24     27.55  Absent    59   20.96   21.60  61  Si
## 29  144    4.09  5.55     31.40 Present    60   29.43    5.55  56  No
## 30  146    0.00  6.62     25.69  Absent    60   28.07    8.23  63  Si
## 31  136    2.52  3.95     25.63  Absent    51   21.86    0.00  45  Si
## 32  158    1.02  6.33     23.88  Absent    66   22.13   24.99  46  Si
## 33  122    6.60  5.58     35.95 Present    53   28.07   12.55  59  Si
## 34  126    8.75  6.53     34.02  Absent    49   30.25    0.00  41  Si
## 35  148    5.50  7.10     25.31  Absent    56   29.84    3.60  48  No
## 36  122    4.26  4.44     13.04  Absent    57   19.49   48.99  28  Si
## 37  140    3.90  7.32     25.05  Absent    47   27.36   36.77  32  No
## 38  110    4.64  4.55     30.46  Absent    48   30.90   15.22  46  No
## 39  130    0.00  2.82     19.63 Present    70   24.86    0.00  29  No
## 40  136   11.20  5.81     31.85 Present    75   27.68   22.94  58  Si
## 41  118    0.28  5.80     33.70 Present    60   30.98    0.00  41  Si
## 42  144    0.04  3.38     23.61  Absent    30   23.75    4.66  30  No
## 43  120    0.00  1.07     16.02  Absent    47   22.15    0.00  15  No
## 44  130    2.61  2.72     22.99 Present    51   26.29   13.37  51  Si
## 45  114    0.00  2.99      9.74  Absent    54   46.58    0.00  17  No
## 46  128    4.65  3.31     22.74  Absent    62   22.95    0.51  48  No
## 47  162    7.40  8.55     24.65 Present    64   25.71    5.86  58  Si
## 48  116    1.91  7.56     26.45 Present    52   30.01    3.60  33  Si
## 49  114    0.00  1.94     11.02  Absent    54   20.17   38.98  16  No
## 50  126    3.80  3.88     31.79  Absent    57   30.53    0.00  30  No
## 51  122    0.00  5.75     30.90 Present    46   29.01    4.11  42  No
## 52  134    2.50  3.66     30.90  Absent    52   27.19   23.66  49  No
## 53  152    0.90  9.12     30.23  Absent    56   28.64    0.37  42  Si
## 54  134    8.08  1.55     17.50 Present    56   22.65   66.65  31  Si
## 55  156    3.00  1.82     27.55  Absent    60   23.91   54.00  53  No
## 56  152    5.99  7.99     32.48  Absent    45   26.57  100.32  48  No
## 57  118    0.00  2.99     16.17  Absent    49   23.83    3.22  28  No
## 58  126    5.10  2.96     26.50  Absent    55   25.52   12.34  38  Si
## 59  103    0.03  4.21     18.96  Absent    48   22.94    2.62  18  No
## 60  121    0.80  5.29     18.95 Present    47   22.51    0.00  61  No
## 61  142    0.28  1.80     21.03  Absent    57   23.65    2.93  33  No
## 62  138    1.15  5.09     27.87 Present    61   25.65    2.34  44  No
## 63  152   10.10  4.71     24.65 Present    65   26.21   24.53  57  No
## 64  140    0.45  4.30     24.33  Absent    41   27.23   10.08  38  No
## 65  130    0.00  1.82     10.45  Absent    57   22.07    2.06  17  No
## 66  136    7.36  2.19     28.11 Present    61   25.00   61.71  54  No
## 67  124    4.82  3.24     21.10 Present    48   28.49    8.42  30  No
## 68  112    0.41  1.88     10.29  Absent    39   22.08   20.98  27  No
## 69  118    4.46  7.27     29.13 Present    48   29.01   11.11  33  No
## 70  122    0.00  3.37     16.10  Absent    67   21.06    0.00  32  Si
## 71  118    0.00  3.67     12.13  Absent    51   19.15    0.60  15  No
## 72  130    1.72  2.66     10.38  Absent    68   17.81   11.10  26  No
## 73  130    5.60  3.37     24.80  Absent    58   25.76   43.20  36  No
## 74  126    0.09  5.03     13.27 Present    50   17.75    4.63  20  No
## 75  128    0.40  6.17     26.35  Absent    64   27.86   11.11  34  No
## 76  136    0.00  4.12     17.42  Absent    52   21.66   12.86  40  No
## 77  134    0.00  5.90     30.84  Absent    49   29.16    0.00  55  No
## 78  140    0.60  5.56     33.39 Present    58   27.19    0.00  55  Si
## 79  168    4.50  6.68     28.47  Absent    43   24.25   24.38  56  Si
## 80  108    0.40  5.91     22.92 Present    57   25.72   72.00  39  No
## 81  114    3.00  7.04     22.64 Present    55   22.59    0.00  45  Si
## 82  140    8.14  4.93     42.49  Absent    53   45.72    6.43  53  Si
## 83  148    4.80  6.09     36.55 Present    63   25.44    0.88  55  Si
## 84  148   12.20  3.79     34.15  Absent    57   26.38   14.40  57  Si
## 85  128    0.00  2.43     13.15 Present    63   20.75    0.00  17  No
## 86  130    0.56  3.30     30.86  Absent    49   27.52   33.33  45  No
## 87  126   10.50  4.49     17.33  Absent    67   19.37    0.00  49  Si
## 88  140    0.00  5.08     27.33 Present    41   27.83    1.25  38  No
## 89  126    0.90  5.64     17.78 Present    55   21.94    0.00  41  No
## 90  122    0.72  4.04     32.38  Absent    34   28.34    0.00  55  No
## 91  116    1.03  2.83     10.85  Absent    45   21.59    1.75  21  No
## 92  120    3.70  4.02     39.66  Absent    61   30.57    0.00  64  Si
## 93  143    0.46  2.40     22.87  Absent    62   29.17   15.43  29  No
## 94  118    4.00  3.95     18.96  Absent    54   25.15    8.33  49  Si
## 95  194    1.70  6.32     33.67  Absent    47   30.16    0.19  56  No
## 96  134    3.00  4.37     23.07  Absent    56   20.54    9.65  62  No
## 97  138    2.16  4.90     24.83 Present    39   26.06   28.29  29  No
## 98  136    0.00  5.00     27.58 Present    49   27.59    1.47  39  No
## 99  122    3.20 11.32     35.36 Present    55   27.07    0.00  51  Si
## 100 164   12.00  3.91     19.59  Absent    51   23.44   19.75  39  No
## 101 136    8.00  7.85     23.81 Present    51   22.69    2.78  50  No
## 102 166    0.07  4.03     29.29  Absent    53   28.37    0.00  27  No
## 103 118    0.00  4.34     30.12 Present    52   32.18    3.91  46  No
## 104 128    0.42  4.60     26.68  Absent    41   30.97   10.33  31  No
## 105 118    1.50  5.38     25.84  Absent    64   28.63    3.89  29  No
## 106 158    3.60  2.97     30.11  Absent    63   26.64  108.00  64  No
## 107 108    1.50  4.33     24.99  Absent    66   22.29   21.60  61  Si
## 108 170    7.60  5.50     37.83 Present    42   37.41    6.17  54  Si
## 109 118    1.00  5.76     22.10  Absent    62   23.48    7.71  42  No
## 110 124    0.00  3.04     17.33  Absent    49   22.04    0.00  18  No
## 111 114    0.00  8.01     21.64  Absent    66   25.51    2.49  16  No
## 112 168    9.00  8.53     24.48 Present    69   26.18    4.63  54  Si
## 113 134    2.00  3.66     14.69  Absent    52   21.03    2.06  37  No
## 114 174    0.00  8.46     35.10 Present    35   25.27    0.00  61  Si
## 115 116   31.20  3.17     14.99  Absent    47   19.40   49.06  59  Si
## 116 128    0.00 10.58     31.81 Present    46   28.41   14.66  48  No
## 117 140    4.50  4.59     18.01  Absent    63   21.91   22.09  32  Si
## 118 154    0.70  5.91     25.00  Absent    13   20.60    0.00  42  No
## 119 150    3.50  6.99     25.39 Present    50   23.35   23.48  61  Si
## 120 130    0.00  3.92     25.55  Absent    68   28.02    0.68  27  No
## 121 128    2.00  6.13     21.31  Absent    66   22.86   11.83  60  No
## 122 120    1.40  6.25     20.47  Absent    60   25.85    8.51  28  No
## 123 120    0.00  5.01     26.13  Absent    64   26.21   12.24  33  No
## 124 138    4.50  2.85     30.11  Absent    55   24.78   24.89  56  Si
## 125 153    7.80  3.96     25.73  Absent    54   25.91   27.03  45  No
## 126 123    8.60 11.17     35.28 Present    70   33.14    0.00  59  Si
## 127 148    4.04  3.99     20.69  Absent    60   27.78    1.75  28  No
## 128 136    3.96  2.76     30.28 Present    50   34.42   18.51  38  No
## 129 134    8.80  7.41     26.84  Absent    35   29.44   29.52  60  Si
## 130 152   12.18  4.04     37.83 Present    63   34.57    4.17  64  No
## 131 158   13.50  5.04     30.79  Absent    54   24.79   21.50  62  No
## 132 132    2.00  3.08     35.39  Absent    45   31.44   79.82  58  Si
## 133 134    1.50  3.73     21.53  Absent    41   24.70   11.11  30  Si
## 134 142    7.44  5.52     33.97  Absent    47   29.29   24.27  54  No
## 135 134    6.00  3.30     28.45  Absent    65   26.09   58.11  40  No
## 136 122    4.18  9.05     29.27 Present    44   24.05   19.34  52  Si
## 137 116    2.70  3.69     13.52  Absent    55   21.13   18.51  32  No
## 138 128    0.50  3.70     12.81 Present    66   21.25   22.73  28  No
## 139 120    0.00  3.68     12.24  Absent    51   20.52    0.51  20  No
## 140 124    0.00  3.95     36.35 Present    59   32.83    9.59  54  No
## 141 160   14.00  5.90     37.12  Absent    58   33.87    3.52  54  Si
## 142 130    2.78  4.89      9.39 Present    63   19.30   17.47  25  Si
## 143 128    2.80  5.53     14.29  Absent    64   24.97    0.51  38  No
## 144 130    4.50  5.86     37.43  Absent    61   31.21   32.30  58  No
## 145 109    1.20  6.14     29.26  Absent    47   24.72   10.46  40  No
## 146 144    0.00  3.84     18.72  Absent    56   22.10    4.80  40  No
## 147 118    1.05  3.16     12.98 Present    46   22.09   16.35  31  No
## 148 136    3.46  6.38     32.25 Present    43   28.73    3.13  43  Si
## 149 136    1.50  6.06     26.54  Absent    54   29.38   14.50  33  Si
## 150 124   15.50  5.05     24.06  Absent    46   23.22    0.00  61  Si
## 151 148    6.00  6.49     26.47  Absent    48   24.70    0.00  55  No
## 152 128    6.60  3.58     20.71  Absent    55   24.15    0.00  52  No
## 153 122    0.28  4.19     19.97  Absent    61   25.63    0.00  24  No
## 154 108    0.00  2.74     11.17  Absent    53   22.61    0.95  20  No
## 155 124    3.04  4.80     19.52 Present    60   21.78  147.19  41  Si
## 156 138    8.80  3.12     22.41 Present    63   23.33  120.03  55  Si
## 157 127    0.00  2.81     15.70  Absent    42   22.03    1.03  17  No
## 158 174    9.45  5.13     35.54  Absent    55   30.71   59.79  53  No
## 159 122    0.00  3.05     23.51  Absent    46   25.81    0.00  38  No
## 160 144    6.75  5.45     29.81  Absent    53   25.62   26.23  43  Si
## 161 126    1.80  6.22     19.71  Absent    65   24.81    0.69  31  No
## 162 208   27.40  3.12     26.63  Absent    66   27.45   33.07  62  Si
## 163 138    0.00  2.68     17.04  Absent    42   22.16    0.00  16  No
## 164 148    0.00  3.84     17.26  Absent    70   20.00    0.00  21  No
## 165 122    0.00  3.08     16.30  Absent    43   22.13    0.00  16  No
## 166 132    7.00  3.20     23.26  Absent    77   23.64   23.14  49  No
## 167 110   12.16  4.99     28.56  Absent    44   27.14   21.60  55  Si
## 168 160    1.52  8.12     29.30 Present    54   25.87   12.86  43  Si
## 169 126    0.54  4.39     21.13 Present    45   25.99    0.00  25  No
## 170 162    5.30  7.95     33.58 Present    58   36.06    8.23  48  No
## 171 194    2.55  6.89     33.88 Present    69   29.33    0.00  41  No
## 172 118    0.75  2.58     20.25  Absent    59   24.46    0.00  32  No
## 173 124    0.00  4.79     34.71  Absent    49   26.09    9.26  47  No
## 174 160    0.00  2.42     34.46  Absent    48   29.83    1.03  61  No
## 175 128    0.00  2.51     29.35 Present    53   22.05    1.37  62  No
## 176 122    4.00  5.24     27.89 Present    45   26.52    0.00  61  Si
## 177 132    2.00  2.70     21.57 Present    50   27.95    9.26  37  No
## 178 120    0.00  2.42     16.66  Absent    46   20.16    0.00  17  No
## 179 128    0.04  8.22     28.17  Absent    65   26.24   11.73  24  No
## 180 108   15.00  4.91     34.65  Absent    41   27.96   14.40  56  No
## 181 166    0.00  4.31     34.27  Absent    45   30.14   13.27  56  No
## 182 152    0.00  6.06     41.05 Present    51   40.34    0.00  51  No
## 183 170    4.20  4.67     35.45 Present    50   27.14    7.92  60  Si
## 184 156    4.00  2.05     19.48 Present    50   21.48   27.77  39  Si
## 185 116    8.00  6.73     28.81 Present    41   26.74   40.94  48  Si
## 186 122    4.40  3.18     11.59 Present    59   21.94    0.00  33  Si
## 187 150   20.00  6.40     35.04  Absent    53   28.88    8.33  63  No
## 188 129    2.15  5.17     27.57  Absent    52   25.42    2.06  39  No
## 189 134    4.80  6.58     29.89 Present    55   24.73   23.66  63  No
## 190 126    0.00  5.98     29.06 Present    56   25.39   11.52  64  Si
## 191 142    0.00  3.72     25.68  Absent    48   24.37    5.25  40  Si
## 192 128    0.70  4.90     37.42 Present    72   35.94    3.09  49  Si
## 193 102    0.40  3.41     17.22 Present    56   23.59    2.06  39  Si
## 194 130    0.00  4.89     25.98  Absent    72   30.42   14.71  23  No
## 195 138    0.05  2.79     10.35  Absent    46   21.62    0.00  18  No
## 196 138    0.00  1.96     11.82 Present    54   22.01    8.13  21  No
## 197 128    0.00  3.09     20.57  Absent    54   25.63    0.51  17  No
## 198 162    2.92  3.63     31.33  Absent    62   31.59   18.51  42  No
## 199 160    3.00  9.19     26.47 Present    39   28.25   14.40  54  Si
## 200 148    0.00  4.66     24.39  Absent    50   25.26    4.03  27  No
## 201 124    0.16  2.44     16.67  Absent    65   24.58   74.91  23  No
## 202 136    3.15  4.37     20.22 Present    59   25.12   47.16  31  Si
## 203 134    2.75  5.51     26.17  Absent    57   29.87    8.33  33  No
## 204 128    0.73  3.97     23.52  Absent    54   23.81   19.20  64  No
## 205 122    3.20  3.59     22.49 Present    45   24.96   36.17  58  No
## 206 152    3.00  4.64     31.29  Absent    41   29.34    4.53  40  No
## 207 162    0.00  5.09     24.60 Present    64   26.71    3.81  18  No
## 208 124    4.00  6.65     30.84 Present    54   28.40   33.51  60  No
## 209 136    5.80  5.90     27.55  Absent    65   25.71   14.40  59  No
## 210 136    8.80  4.26     32.03 Present    52   31.44   34.35  60  No
## 211 134    0.05  8.03     27.95  Absent    48   26.88    0.00  60  No
## 212 122    1.00  5.88     34.81 Present    69   31.27   15.94  40  Si
## 213 116    3.00  3.05     30.31  Absent    41   23.63    0.86  44  No
## 214 132    0.00  0.98     21.39  Absent    62   26.75    0.00  53  No
## 215 134    0.00  2.40     21.11  Absent    57   22.45    1.37  18  No
## 216 160    7.77  8.07     34.80  Absent    64   31.15    0.00  62  Si
## 217 180    0.52  4.23     16.38  Absent    55   22.56   14.77  45  Si
## 218 124    0.81  6.16     11.61  Absent    35   21.47   10.49  26  No
## 219 114    0.00  4.97      9.69  Absent    26   22.60    0.00  25  No
## 220 208    7.40  7.41     32.03  Absent    50   27.62    7.85  57  No
## 221 138    0.00  3.14     12.00  Absent    54   20.28    0.00  16  No
## 222 164    0.50  6.95     39.64 Present    47   41.76    3.81  46  Si
## 223 144    2.40  8.13     35.61  Absent    46   27.38   13.37  60  No
## 224 136    7.50  7.39     28.04 Present    50   25.01    0.00  45  Si
## 225 132    7.28  3.52     12.33  Absent    60   19.48    2.06  56  No
## 226 143    5.04  4.86     23.59  Absent    58   24.69   18.72  42  No
## 227 112    4.46  7.18     26.25 Present    69   27.29    0.00  32  Si
## 228 134   10.00  3.79     34.72  Absent    42   28.33   28.80  52  Si
## 229 138    2.00  5.11     31.40 Present    49   27.25    2.06  64  Si
## 230 188    0.00  5.47     32.44 Present    71   28.99    7.41  50  Si
## 231 110    2.35  3.36     26.72 Present    54   26.08  109.80  58  Si
## 232 136   13.20  7.18     35.95  Absent    48   29.19    0.00  62  No
## 233 130    1.75  5.46     34.34  Absent    53   29.42    0.00  58  Si
## 234 122    0.00  3.76     24.59  Absent    56   24.36    0.00  30  No
## 235 138    0.00  3.24     27.68  Absent    60   25.70   88.66  29  No
## 236 130   18.00  4.13     27.43  Absent    54   27.44    0.00  51  Si
## 237 126    5.50  3.78     34.15  Absent    55   28.85    3.18  61  No
## 238 176    5.76  4.89     26.10 Present    46   27.30   19.44  57  No
## 239 122    0.00  5.49     19.56  Absent    57   23.12   14.02  27  No
## 240 124    0.00  3.23      9.64  Absent    59   22.70    0.00  16  No
## 241 140    5.20  3.58     29.26  Absent    70   27.29   20.17  45  Si
## 242 128    6.00  4.37     22.98 Present    50   26.01    0.00  47  No
## 243 190    4.18  5.05     24.83  Absent    45   26.09   82.85  41  No
## 244 144    0.76 10.53     35.66  Absent    63   34.35    0.00  55  Si
## 245 126    4.60  7.40     31.99 Present    57   28.67    0.37  60  Si
## 246 128    0.00  2.63     23.88  Absent    45   21.59    6.54  57  No
## 247 136    0.40  3.91     21.10 Present    63   22.30    0.00  56  Si
## 248 158    4.00  4.18     28.61 Present    42   25.11    0.00  60  No
## 249 160    0.60  6.94     30.53  Absent    36   25.68    1.42  64  No
## 250 124    6.00  5.21     33.02 Present    64   29.37    7.61  58  Si
## 251 158    6.17  8.12     30.75  Absent    46   27.84   92.62  48  No
## 252 128    0.00  6.34     11.87  Absent    57   23.14    0.00  17  No
## 253 166    3.00  3.82     26.75  Absent    45   20.86    0.00  63  Si
## 254 146    7.50  7.21     25.93 Present    55   22.51    0.51  42  No
## 255 161    9.00  4.65     15.16 Present    58   23.76   43.20  46  No
## 256 164   13.02  6.26     29.38 Present    47   22.75   37.03  54  Si
## 257 146    5.08  7.03     27.41 Present    63   36.46   24.48  37  Si
## 258 142    4.48  3.57     19.75 Present    51   23.54    3.29  49  No
## 259 138   12.00  5.13     28.34  Absent    59   24.49   32.81  58  Si
## 260 154    1.80  7.13     34.04 Present    52   35.51   39.36  44  No
## 261 118    0.00  2.39     12.13  Absent    49   18.46    0.26  17  Si
## 262 124    0.61  2.69     17.15 Present    61   22.76   11.55  20  No
## 263 124    1.04  2.84     16.42 Present    46   20.17    0.00  61  No
## 264 136    5.00  4.19     23.99 Present    68   27.80   25.86  35  No
## 265 132    9.90  4.63     27.86 Present    46   23.39    0.51  52  Si
## 266 118    0.12  1.96     20.31  Absent    37   20.01    2.42  18  No
## 267 118    0.12  4.16      9.37  Absent    57   19.61    0.00  17  No
## 268 134   12.00  4.96     29.79  Absent    53   24.86    8.23  57  No
## 269 114    0.10  3.95     15.89 Present    57   20.31   17.14  16  No
## 270 136    6.80  7.84     30.74 Present    58   26.20   23.66  45  Si
## 271 130    0.00  4.16     39.43 Present    46   30.01    0.00  55  Si
## 272 136    2.20  4.16     38.02  Absent    65   37.24    4.11  41  Si
## 273 136    1.36  3.16     14.97 Present    56   24.98    7.30  24  No
## 274 154    4.20  5.59     25.02  Absent    58   25.02    1.54  43  No
## 275 108    0.80  2.47     17.53  Absent    47   22.18    0.00  55  Si
## 276 136    8.80  4.69     36.07 Present    38   26.56    2.78  63  Si
## 277 174    2.02  6.57     31.90 Present    50   28.75   11.83  64  Si
## 278 124    4.25  8.22     30.77  Absent    56   25.80    0.00  43  No
## 279 114    0.00  2.63      9.69  Absent    45   17.89    0.00  16  No
## 280 118    0.12  3.26     12.26  Absent    55   22.65    0.00  16  No
## 281 106    1.08  4.37     26.08  Absent    67   24.07   17.74  28  Si
## 282 146    3.60  3.51     22.67  Absent    51   22.29   43.71  42  No
## 283 206    0.00  4.17     33.23  Absent    69   27.36    6.17  50  Si
## 284 134    3.00  3.17     17.91  Absent    35   26.37   15.12  27  No
## 285 148   15.00  4.98     36.94 Present    72   31.83   66.27  41  Si
## 286 126    0.21  3.95     15.11  Absent    61   22.17    2.42  17  No
## 287 134    0.00  3.69     13.92  Absent    43   27.66    0.00  19  No
## 288 134    0.02  2.80     18.84  Absent    45   24.82    0.00  17  No
## 289 123    0.05  4.61     13.69  Absent    51   23.23    2.78  16  No
## 290 112    0.60  5.28     25.71  Absent    55   27.02   27.77  38  Si
## 291 112    0.00  1.71     15.96  Absent    42   22.03    3.50  16  No
## 292 101    0.48  7.26     13.00  Absent    50   19.82    5.19  16  No
## 293 150    0.18  4.14     14.40  Absent    53   23.43    7.71  44  No
## 294 170    2.60  7.22     28.69 Present    71   27.87   37.65  56  Si
## 295 134    0.00  5.63     29.12  Absent    68   32.33    2.02  34  No
## 296 142    0.00  4.19     18.04  Absent    56   23.65   20.78  42  Si
## 297 132    0.10  3.28     10.73  Absent    73   20.42    0.00  17  No
## 298 136    0.00  2.28     18.14  Absent    55   22.59    0.00  17  No
## 299 132   12.00  4.51     21.93  Absent    61   26.07   64.80  46  Si
## 300 166    4.10  4.00     34.30 Present    32   29.51    8.23  53  No
## 301 138    0.00  3.96     24.70 Present    53   23.80    0.00  45  No
## 302 138    2.27  6.41     29.07  Absent    58   30.22    2.93  32  Si
## 303 170    0.00  3.12     37.15  Absent    47   35.42    0.00  53  No
## 304 128    0.00  8.41     28.82 Present    60   26.86    0.00  59  Si
## 305 136    1.20  2.78      7.12  Absent    52   22.51    3.41  27  No
## 306 128    0.00  3.22     26.55 Present    39   26.59   16.71  49  No
## 307 150   14.40  5.04     26.52 Present    60   28.84    0.00  45  No
## 308 132    8.40  3.57     13.68  Absent    42   18.75   15.43  59  Si
## 309 142    2.40  2.55     23.89  Absent    54   26.09   59.14  37  No
## 310 130    0.05  2.44     28.25 Present    67   30.86   40.32  34  No
## 311 174    3.50  5.26     21.97 Present    36   22.04    8.33  59  Si
## 312 114    9.60  2.51     29.18  Absent    49   25.67   40.63  46  No
## 313 162    1.50  2.46     19.39 Present    49   24.32    0.00  59  Si
## 314 174    0.00  3.27     35.40  Absent    58   37.71   24.95  44  No
## 315 190    5.15  6.03     36.59  Absent    42   30.31   72.00  50  No
## 316 154    1.40  1.72     18.86  Absent    58   22.67   43.20  59  No
## 317 124    0.00  2.28     24.86 Present    50   22.24    8.26  38  No
## 318 114    1.20  3.98     14.90  Absent    49   23.79   25.82  26  No
## 319 168   11.40  5.08     26.66 Present    56   27.04    2.61  59  Si
## 320 142    3.72  4.24     32.57  Absent    52   24.98    7.61  51  No
## 321 154    0.00  4.81     28.11 Present    56   25.67   75.77  59  No
## 322 146    4.36  4.31     18.44 Present    47   24.72   10.80  38  No
## 323 166    6.00  3.02     29.30  Absent    35   24.38   38.06  61  No
## 324 140    8.60  3.90     32.16 Present    52   28.51   11.11  64  Si
## 325 136    1.70  3.53     20.13  Absent    56   19.44   14.40  55  No
## 326 156    0.00  3.47     21.10  Absent    73   28.40    0.00  36  Si
## 327 132    0.00  6.63     29.58 Present    37   29.41    2.57  62  No
## 328 128    0.00  2.98     12.59  Absent    65   20.74    2.06  19  No
## 329 106    5.60  3.20     12.30  Absent    49   20.29    0.00  39  No
## 330 144    0.40  4.64     30.09  Absent    30   27.39    0.74  55  No
## 331 154    0.31  2.33     16.48  Absent    33   24.00   11.83  17  No
## 332 126    3.10  2.01     32.97 Present    56   28.63   26.74  45  No
## 333 134    6.40  8.49     37.25 Present    56   28.94   10.49  51  Si
## 334 152   19.45  4.22     29.81  Absent    28   23.95    0.00  59  Si
## 335 146    1.35  6.39     34.21  Absent    51   26.43    0.00  59  Si
## 336 162    6.94  4.55     33.36 Present    52   27.09   32.06  43  No
## 337 130    7.28  3.56     23.29 Present    20   26.80   51.87  58  Si
## 338 138    6.00  7.24     37.05  Absent    38   28.69    0.00  59  No
## 339 148    0.00  5.32     26.71 Present    52   32.21   32.78  27  No
## 340 124    4.20  2.94     27.59  Absent    50   30.31   85.06  30  No
## 341 118    1.62  9.01     21.70  Absent    59   25.89   21.19  40  No
## 342 116    4.28  7.02     19.99 Present    68   23.31    0.00  52  Si
## 343 162    6.30  5.73     22.61 Present    46   20.43   62.54  53  Si
## 344 138    0.87  1.87     15.89  Absent    44   26.76   42.99  31  No
## 345 137    1.20  3.14     23.87  Absent    66   24.13   45.00  37  No
## 346 198    0.52 11.89     27.68 Present    48   28.40   78.99  26  Si
## 347 154    4.50  4.75     23.52 Present    43   25.76    0.00  53  Si
## 348 128    5.40  2.36     12.98  Absent    51   18.36    6.69  61  No
## 349 130    0.08  5.59     25.42 Present    50   24.98    6.27  43  Si
## 350 162    5.60  4.24     22.53  Absent    29   22.91    5.66  60  No
## 351 120   10.50  2.70     29.87 Present    54   24.50   16.46  49  No
## 352 136    3.99  2.58     16.38 Present    53   22.41   27.67  36  No
## 353 176    1.20  8.28     36.16 Present    42   27.81   11.60  58  Si
## 354 134   11.79  4.01     26.57 Present    38   21.79   38.88  61  Si
## 355 122    1.70  5.28     32.23 Present    51   24.08    0.00  54  No
## 356 134    0.90  3.18     23.66 Present    52   23.26   27.36  58  Si
## 357 134    0.00  2.43     22.24  Absent    52   26.49   41.66  24  No
## 358 136    6.60  6.08     32.74  Absent    64   33.28    2.72  49  No
## 359 132    4.05  5.15     26.51 Present    31   26.67   16.30  50  No
## 360 152    1.68  3.58     25.43  Absent    50   27.03    0.00  32  No
## 361 132   12.30  5.96     32.79 Present    57   30.12   21.50  62  Si
## 362 124    0.40  3.67     25.76  Absent    43   28.08   20.57  34  No
## 363 140    4.20  2.91     28.83 Present    43   24.70   47.52  48  No
## 364 166    0.60  2.42     34.03 Present    53   26.96   54.00  60  No
## 365 156    3.02  5.35     25.72 Present    53   25.22   28.11  52  Si
## 366 132    0.72  4.37     19.54  Absent    48   26.11   49.37  28  No
## 367 150    0.00  4.99     27.73  Absent    57   30.92    8.33  24  No
## 368 134    0.12  3.40     21.18 Present    33   26.27   14.21  30  No
## 369 126    3.40  4.87     15.16 Present    65   22.01   11.11  38  No
## 370 148    0.50  5.97     32.88  Absent    54   29.27    6.43  42  No
## 371 148    8.20  7.75     34.46 Present    46   26.53    6.04  64  Si
## 372 132    6.00  5.97     25.73 Present    66   24.18  145.29  41  No
## 373 128    1.60  5.41     29.30  Absent    68   29.38   23.97  32  No
## 374 128    5.16  4.90     31.35 Present    57   26.42    0.00  64  No
## 375 140    0.00  2.40     27.89 Present    70   30.74  144.00  29  No
## 376 126    0.00  5.29     27.64  Absent    25   27.62    2.06  45  No
## 377 114    3.60  4.16     22.58  Absent    60   24.49   65.31  31  No
## 378 118    1.25  4.69     31.58 Present    52   27.16    4.11  53  No
## 379 126    0.96  4.99     29.74  Absent    66   33.35   58.32  38  No
## 380 154    4.50  4.68     39.97  Absent    61   33.17    1.54  64  Si
## 381 112    1.44  2.71     22.92  Absent    59   24.81    0.00  52  No
## 382 140    8.00  4.42     33.15 Present    47   32.77   66.86  44  No
## 383 140    1.68 11.41     29.54 Present    74   30.75    2.06  38  Si
## 384 128    2.60  4.94     21.36  Absent    61   21.30    0.00  31  No
## 385 126   19.60  6.03     34.99  Absent    49   26.99   55.89  44  No
## 386 160    4.20  6.76     37.99 Present    61   32.91    3.09  54  Si
## 387 144    0.00  4.17     29.63 Present    52   21.83    0.00  59  No
## 388 148    4.50 10.49     33.27  Absent    50   25.92    2.06  53  Si
## 389 146    0.00  4.92     18.53  Absent    57   24.20   34.97  26  No
## 390 164    5.60  3.17     30.98 Present    44   25.99   43.20  53  Si
## 391 130    0.54  3.63     22.03 Present    69   24.34   12.86  39  Si
## 392 154    2.40  5.63     42.17 Present    59   35.07   12.86  50  Si
## 393 178    0.95  4.75     21.06  Absent    49   23.74   24.69  61  No
## 394 180    3.57  3.57     36.10  Absent    36   26.70   19.95  64  No
## 395 134   12.50  2.73     39.35  Absent    48   35.58    0.00  48  No
## 396 142    0.00  3.54     16.64  Absent    58   25.97    8.36  27  No
## 397 162    7.00  7.67     34.34 Present    33   30.77    0.00  62  No
## 398 218   11.20  2.77     30.79  Absent    38   24.86   90.93  48  Si
## 399 126    8.75  6.06     32.72 Present    33   27.00   62.43  55  Si
## 400 126    0.00  3.57     26.01  Absent    61   26.30    7.97  47  No
## 401 134    6.10  4.77     26.08  Absent    47   23.82    1.03  49  No
## 402 132    0.00  4.17     36.57  Absent    57   30.61   18.00  49  No
## 403 178    5.50  3.79     23.92 Present    45   21.26    6.17  62  Si
## 404 208    5.04  5.19     20.71 Present    52   25.12   24.27  58  Si
## 405 160    1.15 10.19     39.71  Absent    31   31.65   20.52  57  No
## 406 116    2.38  5.67     29.01 Present    54   27.26   15.77  51  No
## 407 180   25.01  3.70     38.11 Present    57   30.54    0.00  61  Si
## 408 200   19.20  4.43     40.60 Present    55   32.04   36.00  60  Si
## 409 112    4.20  3.58     27.14  Absent    52   26.83    2.06  40  No
## 410 120    0.00  3.10     26.97  Absent    41   24.80    0.00  16  No
## 411 178   20.00  9.78     33.55  Absent    37   27.29    2.88  62  Si
## 412 166    0.80  5.63     36.21  Absent    50   34.72   28.80  60  No
## 413 164    8.20 14.16     36.85  Absent    52   28.50   17.02  55  Si
## 414 216    0.92  2.66     19.85 Present    49   20.58    0.51  63  Si
## 415 146    6.40  5.62     33.05 Present    57   31.03    0.74  46  No
## 416 134    1.10  3.54     20.41 Present    58   24.54   39.91  39  Si
## 417 158   16.00  5.56     29.35  Absent    36   25.92   58.32  60  No
## 418 176    0.00  3.14     31.04 Present    45   30.18    4.63  45  No
## 419 132    2.80  4.79     20.47 Present    50   22.15   11.73  48  No
## 420 126    0.00  4.55     29.18  Absent    48   24.94   36.00  41  No
## 421 120    5.50  3.51     23.23  Absent    46   22.40   90.31  43  No
## 422 174    0.00  3.86     21.73  Absent    42   23.37    0.00  63  No
## 423 150   13.80  5.10     29.45 Present    52   27.92   77.76  55  Si
## 424 176    6.00  3.98     17.20 Present    52   21.07    4.11  61  Si
## 425 142    2.20  3.29     22.70  Absent    44   23.66    5.66  42  Si
## 426 132    0.00  3.30     21.61  Absent    42   24.92   32.61  33  No
## 427 142    1.32  7.63     29.98 Present    57   31.16   72.93  33  No
## 428 146    1.16  2.28     34.53  Absent    50   28.71   45.00  49  No
## 429 132    7.20  3.65     17.16 Present    56   23.25    0.00  34  No
## 430 120    0.00  3.57     23.22  Absent    58   27.20    0.00  32  No
## 431 118    0.00  3.89     15.96  Absent    65   20.18    0.00  16  No
## 432 108    0.00  1.43     26.26  Absent    42   19.38    0.00  16  No
## 433 136    0.00  4.00     19.06  Absent    40   21.94    2.06  16  No
## 434 120    0.00  2.46     13.39  Absent    47   22.01    0.51  18  No
## 435 132    0.00  3.55      8.66 Present    61   18.50    3.87  16  No
## 436 136    0.00  1.77     20.37  Absent    45   21.51    2.06  16  No
## 437 138    0.00  1.86     18.35 Present    59   25.38    6.51  17  No
## 438 138    0.06  4.15     20.66  Absent    49   22.59    2.49  16  No
## 439 130    1.22  3.30     13.65  Absent    50   21.40    3.81  31  No
## 440 130    4.00  2.40     17.42  Absent    60   22.05    0.00  40  No
## 441 110    0.00  7.14     28.28  Absent    57   29.00    0.00  32  No
## 442 120    0.00  3.98     13.19 Present    47   21.89    0.00  16  No
## 443 166    6.00  8.80     37.89  Absent    39   28.70   43.20  52  No
## 444 134    0.57  4.75     23.07  Absent    67   26.33    0.00  37  No
## 445 142    3.00  3.69     25.10  Absent    60   30.08   38.88  27  No
## 446 136    2.80  2.53      9.28 Present    61   20.70    4.55  25  No
## 447 142    0.00  4.32     25.22  Absent    47   28.92    6.53  34  Si
## 448 130    0.00  1.88     12.51 Present    52   20.28    0.00  17  No
## 449 124    1.80  3.74     16.64 Present    42   22.26   10.49  20  No
## 450 144    4.00  5.03     25.78 Present    57   27.55   90.00  48  Si
## 451 136    1.81  3.31      6.74  Absent    63   19.57   24.94  24  No
## 452 120    0.00  2.77     13.35  Absent    67   23.37    1.03  18  No
## 453 154    5.53  3.20     28.81 Present    61   26.15   42.79  42  No
## 454 124    1.60  7.22     39.68 Present    36   31.50    0.00  51  Si
## 455 146    0.64  4.82     28.02  Absent    60   28.11    8.23  39  Si
## 456 128    2.24  2.83     26.48  Absent    48   23.96   47.42  27  Si
## 457 170    0.40  4.11     42.06 Present    56   33.10    2.06  57  No
## 458 214    0.40  5.98     31.72  Absent    64   28.45    0.00  58  No
## 459 182    4.20  4.41     32.10  Absent    52   28.61   18.72  52  Si
## 460 108    3.00  1.59     15.23  Absent    40   20.09   26.64  55  No
## 461 118    5.40 11.61     30.79  Absent    64   27.35   23.97  40  No
## 462 132    0.00  4.82     33.41 Present    62   14.70    0.00  46  Si
dim(SAheart)
## [1] 462  10
SAheart$sbp
##   [1] 160 144 118 170 134 132 142 114 114 132 206 134 118 132 112 117 120
##  [18] 146 158 124 106 132 150 138 142 124 118 145 144 146 136 158 122 126
##  [35] 148 122 140 110 130 136 118 144 120 130 114 128 162 116 114 126 122
##  [52] 134 152 134 156 152 118 126 103 121 142 138 152 140 130 136 124 112
##  [69] 118 122 118 130 130 126 128 136 134 140 168 108 114 140 148 148 128
##  [86] 130 126 140 126 122 116 120 143 118 194 134 138 136 122 164 136 166
## [103] 118 128 118 158 108 170 118 124 114 168 134 174 116 128 140 154 150
## [120] 130 128 120 120 138 153 123 148 136 134 152 158 132 134 142 134 122
## [137] 116 128 120 124 160 130 128 130 109 144 118 136 136 124 148 128 122
## [154] 108 124 138 127 174 122 144 126 208 138 148 122 132 110 160 126 162
## [171] 194 118 124 160 128 122 132 120 128 108 166 152 170 156 116 122 150
## [188] 129 134 126 142 128 102 130 138 138 128 162 160 148 124 136 134 128
## [205] 122 152 162 124 136 136 134 122 116 132 134 160 180 124 114 208 138
## [222] 164 144 136 132 143 112 134 138 188 110 136 130 122 138 130 126 176
## [239] 122 124 140 128 190 144 126 128 136 158 160 124 158 128 166 146 161
## [256] 164 146 142 138 154 118 124 124 136 132 118 118 134 114 136 130 136
## [273] 136 154 108 136 174 124 114 118 106 146 206 134 148 126 134 134 123
## [290] 112 112 101 150 170 134 142 132 136 132 166 138 138 170 128 136 128
## [307] 150 132 142 130 174 114 162 174 190 154 124 114 168 142 154 146 166
## [324] 140 136 156 132 128 106 144 154 126 134 152 146 162 130 138 148 124
## [341] 118 116 162 138 137 198 154 128 130 162 120 136 176 134 122 134 134
## [358] 136 132 152 132 124 140 166 156 132 150 134 126 148 148 132 128 128
## [375] 140 126 114 118 126 154 112 140 140 128 126 160 144 148 146 164 130
## [392] 154 178 180 134 142 162 218 126 126 134 132 178 208 160 116 180 200
## [409] 112 120 178 166 164 216 146 134 158 176 132 126 120 174 150 176 142
## [426] 132 142 146 132 120 118 108 136 120 132 136 138 138 130 130 110 120
## [443] 166 134 142 136 142 130 124 144 136 120 154 124 146 128 170 214 182
## [460] 108 118 132
SAheart$tobacco
##   [1] 12.00  0.01  0.08  7.50 13.60  6.20  4.05  4.08  0.00  0.00  6.00
##  [12] 14.10  0.00  0.00  9.65  1.53  7.50 10.50  2.60 14.00  1.61  7.90
##  [23]  0.30  0.60 18.20  4.00  6.00  9.10  4.09  0.00  2.52  1.02  6.60
##  [34]  8.75  5.50  4.26  3.90  4.64  0.00 11.20  0.28  0.04  0.00  2.61
##  [45]  0.00  4.65  7.40  1.91  0.00  3.80  0.00  2.50  0.90  8.08  3.00
##  [56]  5.99  0.00  5.10  0.03  0.80  0.28  1.15 10.10  0.45  0.00  7.36
##  [67]  4.82  0.41  4.46  0.00  0.00  1.72  5.60  0.09  0.40  0.00  0.00
##  [78]  0.60  4.50  0.40  3.00  8.14  4.80 12.20  0.00  0.56 10.50  0.00
##  [89]  0.90  0.72  1.03  3.70  0.46  4.00  1.70  3.00  2.16  0.00  3.20
## [100] 12.00  8.00  0.07  0.00  0.42  1.50  3.60  1.50  7.60  1.00  0.00
## [111]  0.00  9.00  2.00  0.00 31.20  0.00  4.50  0.70  3.50  0.00  2.00
## [122]  1.40  0.00  4.50  7.80  8.60  4.04  3.96  8.80 12.18 13.50  2.00
## [133]  1.50  7.44  6.00  4.18  2.70  0.50  0.00  0.00 14.00  2.78  2.80
## [144]  4.50  1.20  0.00  1.05  3.46  1.50 15.50  6.00  6.60  0.28  0.00
## [155]  3.04  8.80  0.00  9.45  0.00  6.75  1.80 27.40  0.00  0.00  0.00
## [166]  7.00 12.16  1.52  0.54  5.30  2.55  0.75  0.00  0.00  0.00  4.00
## [177]  2.00  0.00  0.04 15.00  0.00  0.00  4.20  4.00  8.00  4.40 20.00
## [188]  2.15  4.80  0.00  0.00  0.70  0.40  0.00  0.05  0.00  0.00  2.92
## [199]  3.00  0.00  0.16  3.15  2.75  0.73  3.20  3.00  0.00  4.00  5.80
## [210]  8.80  0.05  1.00  3.00  0.00  0.00  7.77  0.52  0.81  0.00  7.40
## [221]  0.00  0.50  2.40  7.50  7.28  5.04  4.46 10.00  2.00  0.00  2.35
## [232] 13.20  1.75  0.00  0.00 18.00  5.50  5.76  0.00  0.00  5.20  6.00
## [243]  4.18  0.76  4.60  0.00  0.40  4.00  0.60  6.00  6.17  0.00  3.00
## [254]  7.50  9.00 13.02  5.08  4.48 12.00  1.80  0.00  0.61  1.04  5.00
## [265]  9.90  0.12  0.12 12.00  0.10  6.80  0.00  2.20  1.36  4.20  0.80
## [276]  8.80  2.02  4.25  0.00  0.12  1.08  3.60  0.00  3.00 15.00  0.21
## [287]  0.00  0.02  0.05  0.60  0.00  0.48  0.18  2.60  0.00  0.00  0.10
## [298]  0.00 12.00  4.10  0.00  2.27  0.00  0.00  1.20  0.00 14.40  8.40
## [309]  2.40  0.05  3.50  9.60  1.50  0.00  5.15  1.40  0.00  1.20 11.40
## [320]  3.72  0.00  4.36  6.00  8.60  1.70  0.00  0.00  0.00  5.60  0.40
## [331]  0.31  3.10  6.40 19.45  1.35  6.94  7.28  6.00  0.00  4.20  1.62
## [342]  4.28  6.30  0.87  1.20  0.52  4.50  5.40  0.08  5.60 10.50  3.99
## [353]  1.20 11.79  1.70  0.90  0.00  6.60  4.05  1.68 12.30  0.40  4.20
## [364]  0.60  3.02  0.72  0.00  0.12  3.40  0.50  8.20  6.00  1.60  5.16
## [375]  0.00  0.00  3.60  1.25  0.96  4.50  1.44  8.00  1.68  2.60 19.60
## [386]  4.20  0.00  4.50  0.00  5.60  0.54  2.40  0.95  3.57 12.50  0.00
## [397]  7.00 11.20  8.75  0.00  6.10  0.00  5.50  5.04  1.15  2.38 25.01
## [408] 19.20  4.20  0.00 20.00  0.80  8.20  0.92  6.40  1.10 16.00  0.00
## [419]  2.80  0.00  5.50  0.00 13.80  6.00  2.20  0.00  1.32  1.16  7.20
## [430]  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.06  1.22  4.00
## [441]  0.00  0.00  6.00  0.57  3.00  2.80  0.00  0.00  1.80  4.00  1.81
## [452]  0.00  5.53  1.60  0.64  2.24  0.40  0.40  4.20  3.00  5.40  0.00
SAheart$ldl
##   [1]  5.73  4.41  3.48  6.41  3.50  6.47  3.38  4.59  3.83  5.80  2.95
##  [12]  4.44  1.88  1.87  2.29  2.44 15.33  8.29  7.46  6.23  1.74  2.85
##  [23]  6.38  3.81  4.34 12.42  9.65  5.24  5.55  6.62  3.95  6.33  5.58
##  [34]  6.53  7.10  4.44  7.32  4.55  2.82  5.81  5.80  3.38  1.07  2.72
##  [45]  2.99  3.31  8.55  7.56  1.94  3.88  5.75  3.66  9.12  1.55  1.82
##  [56]  7.99  2.99  2.96  4.21  5.29  1.80  5.09  4.71  4.30  1.82  2.19
##  [67]  3.24  1.88  7.27  3.37  3.67  2.66  3.37  5.03  6.17  4.12  5.90
##  [78]  5.56  6.68  5.91  7.04  4.93  6.09  3.79  2.43  3.30  4.49  5.08
##  [89]  5.64  4.04  2.83  4.02  2.40  3.95  6.32  4.37  4.90  5.00 11.32
## [100]  3.91  7.85  4.03  4.34  4.60  5.38  2.97  4.33  5.50  5.76  3.04
## [111]  8.01  8.53  3.66  8.46  3.17 10.58  4.59  5.91  6.99  3.92  6.13
## [122]  6.25  5.01  2.85  3.96 11.17  3.99  2.76  7.41  4.04  5.04  3.08
## [133]  3.73  5.52  3.30  9.05  3.69  3.70  3.68  3.95  5.90  4.89  5.53
## [144]  5.86  6.14  3.84  3.16  6.38  6.06  5.05  6.49  3.58  4.19  2.74
## [155]  4.80  3.12  2.81  5.13  3.05  5.45  6.22  3.12  2.68  3.84  3.08
## [166]  3.20  4.99  8.12  4.39  7.95  6.89  2.58  4.79  2.42  2.51  5.24
## [177]  2.70  2.42  8.22  4.91  4.31  6.06  4.67  2.05  6.73  3.18  6.40
## [188]  5.17  6.58  5.98  3.72  4.90  3.41  4.89  2.79  1.96  3.09  3.63
## [199]  9.19  4.66  2.44  4.37  5.51  3.97  3.59  4.64  5.09  6.65  5.90
## [210]  4.26  8.03  5.88  3.05  0.98  2.40  8.07  4.23  6.16  4.97  7.41
## [221]  3.14  6.95  8.13  7.39  3.52  4.86  7.18  3.79  5.11  5.47  3.36
## [232]  7.18  5.46  3.76  3.24  4.13  3.78  4.89  5.49  3.23  3.58  4.37
## [243]  5.05 10.53  7.40  2.63  3.91  4.18  6.94  5.21  8.12  6.34  3.82
## [254]  7.21  4.65  6.26  7.03  3.57  5.13  7.13  2.39  2.69  2.84  4.19
## [265]  4.63  1.96  4.16  4.96  3.95  7.84  4.16  4.16  3.16  5.59  2.47
## [276]  4.69  6.57  8.22  2.63  3.26  4.37  3.51  4.17  3.17  4.98  3.95
## [287]  3.69  2.80  4.61  5.28  1.71  7.26  4.14  7.22  5.63  4.19  3.28
## [298]  2.28  4.51  4.00  3.96  6.41  3.12  8.41  2.78  3.22  5.04  3.57
## [309]  2.55  2.44  5.26  2.51  2.46  3.27  6.03  1.72  2.28  3.98  5.08
## [320]  4.24  4.81  4.31  3.02  3.90  3.53  3.47  6.63  2.98  3.20  4.64
## [331]  2.33  2.01  8.49  4.22  6.39  4.55  3.56  7.24  5.32  2.94  9.01
## [342]  7.02  5.73  1.87  3.14 11.89  4.75  2.36  5.59  4.24  2.70  2.58
## [353]  8.28  4.01  5.28  3.18  2.43  6.08  5.15  3.58  5.96  3.67  2.91
## [364]  2.42  5.35  4.37  4.99  3.40  4.87  5.97  7.75  5.97  5.41  4.90
## [375]  2.40  5.29  4.16  4.69  4.99  4.68  2.71  4.42 11.41  4.94  6.03
## [386]  6.76  4.17 10.49  4.92  3.17  3.63  5.63  4.75  3.57  2.73  3.54
## [397]  7.67  2.77  6.06  3.57  4.77  4.17  3.79  5.19 10.19  5.67  3.70
## [408]  4.43  3.58  3.10  9.78  5.63 14.16  2.66  5.62  3.54  5.56  3.14
## [419]  4.79  4.55  3.51  3.86  5.10  3.98  3.29  3.30  7.63  2.28  3.65
## [430]  3.57  3.89  1.43  4.00  2.46  3.55  1.77  1.86  4.15  3.30  2.40
## [441]  7.14  3.98  8.80  4.75  3.69  2.53  4.32  1.88  3.74  5.03  3.31
## [452]  2.77  3.20  7.22  4.82  2.83  4.11  5.98  4.41  1.59 11.61  4.82
SAheart[,1]
##   [1] 160 144 118 170 134 132 142 114 114 132 206 134 118 132 112 117 120
##  [18] 146 158 124 106 132 150 138 142 124 118 145 144 146 136 158 122 126
##  [35] 148 122 140 110 130 136 118 144 120 130 114 128 162 116 114 126 122
##  [52] 134 152 134 156 152 118 126 103 121 142 138 152 140 130 136 124 112
##  [69] 118 122 118 130 130 126 128 136 134 140 168 108 114 140 148 148 128
##  [86] 130 126 140 126 122 116 120 143 118 194 134 138 136 122 164 136 166
## [103] 118 128 118 158 108 170 118 124 114 168 134 174 116 128 140 154 150
## [120] 130 128 120 120 138 153 123 148 136 134 152 158 132 134 142 134 122
## [137] 116 128 120 124 160 130 128 130 109 144 118 136 136 124 148 128 122
## [154] 108 124 138 127 174 122 144 126 208 138 148 122 132 110 160 126 162
## [171] 194 118 124 160 128 122 132 120 128 108 166 152 170 156 116 122 150
## [188] 129 134 126 142 128 102 130 138 138 128 162 160 148 124 136 134 128
## [205] 122 152 162 124 136 136 134 122 116 132 134 160 180 124 114 208 138
## [222] 164 144 136 132 143 112 134 138 188 110 136 130 122 138 130 126 176
## [239] 122 124 140 128 190 144 126 128 136 158 160 124 158 128 166 146 161
## [256] 164 146 142 138 154 118 124 124 136 132 118 118 134 114 136 130 136
## [273] 136 154 108 136 174 124 114 118 106 146 206 134 148 126 134 134 123
## [290] 112 112 101 150 170 134 142 132 136 132 166 138 138 170 128 136 128
## [307] 150 132 142 130 174 114 162 174 190 154 124 114 168 142 154 146 166
## [324] 140 136 156 132 128 106 144 154 126 134 152 146 162 130 138 148 124
## [341] 118 116 162 138 137 198 154 128 130 162 120 136 176 134 122 134 134
## [358] 136 132 152 132 124 140 166 156 132 150 134 126 148 148 132 128 128
## [375] 140 126 114 118 126 154 112 140 140 128 126 160 144 148 146 164 130
## [392] 154 178 180 134 142 162 218 126 126 134 132 178 208 160 116 180 200
## [409] 112 120 178 166 164 216 146 134 158 176 132 126 120 174 150 176 142
## [426] 132 142 146 132 120 118 108 136 120 132 136 138 138 130 130 110 120
## [443] 166 134 142 136 142 130 124 144 136 120 154 124 146 128 170 214 182
## [460] 108 118 132
SAheart[,2]
##   [1] 12.00  0.01  0.08  7.50 13.60  6.20  4.05  4.08  0.00  0.00  6.00
##  [12] 14.10  0.00  0.00  9.65  1.53  7.50 10.50  2.60 14.00  1.61  7.90
##  [23]  0.30  0.60 18.20  4.00  6.00  9.10  4.09  0.00  2.52  1.02  6.60
##  [34]  8.75  5.50  4.26  3.90  4.64  0.00 11.20  0.28  0.04  0.00  2.61
##  [45]  0.00  4.65  7.40  1.91  0.00  3.80  0.00  2.50  0.90  8.08  3.00
##  [56]  5.99  0.00  5.10  0.03  0.80  0.28  1.15 10.10  0.45  0.00  7.36
##  [67]  4.82  0.41  4.46  0.00  0.00  1.72  5.60  0.09  0.40  0.00  0.00
##  [78]  0.60  4.50  0.40  3.00  8.14  4.80 12.20  0.00  0.56 10.50  0.00
##  [89]  0.90  0.72  1.03  3.70  0.46  4.00  1.70  3.00  2.16  0.00  3.20
## [100] 12.00  8.00  0.07  0.00  0.42  1.50  3.60  1.50  7.60  1.00  0.00
## [111]  0.00  9.00  2.00  0.00 31.20  0.00  4.50  0.70  3.50  0.00  2.00
## [122]  1.40  0.00  4.50  7.80  8.60  4.04  3.96  8.80 12.18 13.50  2.00
## [133]  1.50  7.44  6.00  4.18  2.70  0.50  0.00  0.00 14.00  2.78  2.80
## [144]  4.50  1.20  0.00  1.05  3.46  1.50 15.50  6.00  6.60  0.28  0.00
## [155]  3.04  8.80  0.00  9.45  0.00  6.75  1.80 27.40  0.00  0.00  0.00
## [166]  7.00 12.16  1.52  0.54  5.30  2.55  0.75  0.00  0.00  0.00  4.00
## [177]  2.00  0.00  0.04 15.00  0.00  0.00  4.20  4.00  8.00  4.40 20.00
## [188]  2.15  4.80  0.00  0.00  0.70  0.40  0.00  0.05  0.00  0.00  2.92
## [199]  3.00  0.00  0.16  3.15  2.75  0.73  3.20  3.00  0.00  4.00  5.80
## [210]  8.80  0.05  1.00  3.00  0.00  0.00  7.77  0.52  0.81  0.00  7.40
## [221]  0.00  0.50  2.40  7.50  7.28  5.04  4.46 10.00  2.00  0.00  2.35
## [232] 13.20  1.75  0.00  0.00 18.00  5.50  5.76  0.00  0.00  5.20  6.00
## [243]  4.18  0.76  4.60  0.00  0.40  4.00  0.60  6.00  6.17  0.00  3.00
## [254]  7.50  9.00 13.02  5.08  4.48 12.00  1.80  0.00  0.61  1.04  5.00
## [265]  9.90  0.12  0.12 12.00  0.10  6.80  0.00  2.20  1.36  4.20  0.80
## [276]  8.80  2.02  4.25  0.00  0.12  1.08  3.60  0.00  3.00 15.00  0.21
## [287]  0.00  0.02  0.05  0.60  0.00  0.48  0.18  2.60  0.00  0.00  0.10
## [298]  0.00 12.00  4.10  0.00  2.27  0.00  0.00  1.20  0.00 14.40  8.40
## [309]  2.40  0.05  3.50  9.60  1.50  0.00  5.15  1.40  0.00  1.20 11.40
## [320]  3.72  0.00  4.36  6.00  8.60  1.70  0.00  0.00  0.00  5.60  0.40
## [331]  0.31  3.10  6.40 19.45  1.35  6.94  7.28  6.00  0.00  4.20  1.62
## [342]  4.28  6.30  0.87  1.20  0.52  4.50  5.40  0.08  5.60 10.50  3.99
## [353]  1.20 11.79  1.70  0.90  0.00  6.60  4.05  1.68 12.30  0.40  4.20
## [364]  0.60  3.02  0.72  0.00  0.12  3.40  0.50  8.20  6.00  1.60  5.16
## [375]  0.00  0.00  3.60  1.25  0.96  4.50  1.44  8.00  1.68  2.60 19.60
## [386]  4.20  0.00  4.50  0.00  5.60  0.54  2.40  0.95  3.57 12.50  0.00
## [397]  7.00 11.20  8.75  0.00  6.10  0.00  5.50  5.04  1.15  2.38 25.01
## [408] 19.20  4.20  0.00 20.00  0.80  8.20  0.92  6.40  1.10 16.00  0.00
## [419]  2.80  0.00  5.50  0.00 13.80  6.00  2.20  0.00  1.32  1.16  7.20
## [430]  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.06  1.22  4.00
## [441]  0.00  0.00  6.00  0.57  3.00  2.80  0.00  0.00  1.80  4.00  1.81
## [452]  0.00  5.53  1.60  0.64  2.24  0.40  0.40  4.20  3.00  5.40  0.00
SAheart[,3]
##   [1]  5.73  4.41  3.48  6.41  3.50  6.47  3.38  4.59  3.83  5.80  2.95
##  [12]  4.44  1.88  1.87  2.29  2.44 15.33  8.29  7.46  6.23  1.74  2.85
##  [23]  6.38  3.81  4.34 12.42  9.65  5.24  5.55  6.62  3.95  6.33  5.58
##  [34]  6.53  7.10  4.44  7.32  4.55  2.82  5.81  5.80  3.38  1.07  2.72
##  [45]  2.99  3.31  8.55  7.56  1.94  3.88  5.75  3.66  9.12  1.55  1.82
##  [56]  7.99  2.99  2.96  4.21  5.29  1.80  5.09  4.71  4.30  1.82  2.19
##  [67]  3.24  1.88  7.27  3.37  3.67  2.66  3.37  5.03  6.17  4.12  5.90
##  [78]  5.56  6.68  5.91  7.04  4.93  6.09  3.79  2.43  3.30  4.49  5.08
##  [89]  5.64  4.04  2.83  4.02  2.40  3.95  6.32  4.37  4.90  5.00 11.32
## [100]  3.91  7.85  4.03  4.34  4.60  5.38  2.97  4.33  5.50  5.76  3.04
## [111]  8.01  8.53  3.66  8.46  3.17 10.58  4.59  5.91  6.99  3.92  6.13
## [122]  6.25  5.01  2.85  3.96 11.17  3.99  2.76  7.41  4.04  5.04  3.08
## [133]  3.73  5.52  3.30  9.05  3.69  3.70  3.68  3.95  5.90  4.89  5.53
## [144]  5.86  6.14  3.84  3.16  6.38  6.06  5.05  6.49  3.58  4.19  2.74
## [155]  4.80  3.12  2.81  5.13  3.05  5.45  6.22  3.12  2.68  3.84  3.08
## [166]  3.20  4.99  8.12  4.39  7.95  6.89  2.58  4.79  2.42  2.51  5.24
## [177]  2.70  2.42  8.22  4.91  4.31  6.06  4.67  2.05  6.73  3.18  6.40
## [188]  5.17  6.58  5.98  3.72  4.90  3.41  4.89  2.79  1.96  3.09  3.63
## [199]  9.19  4.66  2.44  4.37  5.51  3.97  3.59  4.64  5.09  6.65  5.90
## [210]  4.26  8.03  5.88  3.05  0.98  2.40  8.07  4.23  6.16  4.97  7.41
## [221]  3.14  6.95  8.13  7.39  3.52  4.86  7.18  3.79  5.11  5.47  3.36
## [232]  7.18  5.46  3.76  3.24  4.13  3.78  4.89  5.49  3.23  3.58  4.37
## [243]  5.05 10.53  7.40  2.63  3.91  4.18  6.94  5.21  8.12  6.34  3.82
## [254]  7.21  4.65  6.26  7.03  3.57  5.13  7.13  2.39  2.69  2.84  4.19
## [265]  4.63  1.96  4.16  4.96  3.95  7.84  4.16  4.16  3.16  5.59  2.47
## [276]  4.69  6.57  8.22  2.63  3.26  4.37  3.51  4.17  3.17  4.98  3.95
## [287]  3.69  2.80  4.61  5.28  1.71  7.26  4.14  7.22  5.63  4.19  3.28
## [298]  2.28  4.51  4.00  3.96  6.41  3.12  8.41  2.78  3.22  5.04  3.57
## [309]  2.55  2.44  5.26  2.51  2.46  3.27  6.03  1.72  2.28  3.98  5.08
## [320]  4.24  4.81  4.31  3.02  3.90  3.53  3.47  6.63  2.98  3.20  4.64
## [331]  2.33  2.01  8.49  4.22  6.39  4.55  3.56  7.24  5.32  2.94  9.01
## [342]  7.02  5.73  1.87  3.14 11.89  4.75  2.36  5.59  4.24  2.70  2.58
## [353]  8.28  4.01  5.28  3.18  2.43  6.08  5.15  3.58  5.96  3.67  2.91
## [364]  2.42  5.35  4.37  4.99  3.40  4.87  5.97  7.75  5.97  5.41  4.90
## [375]  2.40  5.29  4.16  4.69  4.99  4.68  2.71  4.42 11.41  4.94  6.03
## [386]  6.76  4.17 10.49  4.92  3.17  3.63  5.63  4.75  3.57  2.73  3.54
## [397]  7.67  2.77  6.06  3.57  4.77  4.17  3.79  5.19 10.19  5.67  3.70
## [408]  4.43  3.58  3.10  9.78  5.63 14.16  2.66  5.62  3.54  5.56  3.14
## [419]  4.79  4.55  3.51  3.86  5.10  3.98  3.29  3.30  7.63  2.28  3.65
## [430]  3.57  3.89  1.43  4.00  2.46  3.55  1.77  1.86  4.15  3.30  2.40
## [441]  7.14  3.98  8.80  4.75  3.69  2.53  4.32  1.88  3.74  5.03  3.31
## [452]  2.77  3.20  7.22  4.82  2.83  4.11  5.98  4.41  1.59 11.61  4.82
str(SAheart)
## 'data.frame':    462 obs. of  10 variables:
##  $ sbp      : int  160 144 118 170 134 132 142 114 114 132 ...
##  $ tobacco  : num  12 0.01 0.08 7.5 13.6 6.2 4.05 4.08 0 0 ...
##  $ ldl      : num  5.73 4.41 3.48 6.41 3.5 6.47 3.38 4.59 3.83 5.8 ...
##  $ adiposity: num  23.1 28.6 32.3 38 27.8 ...
##  $ famhist  : Factor w/ 2 levels "Absent","Present": 2 1 2 2 2 2 1 2 2 2 ...
##  $ typea    : int  49 55 52 51 60 62 59 62 49 69 ...
##  $ obesity  : num  25.3 28.9 29.1 32 26 ...
##  $ alcohol  : num  97.2 2.06 3.81 24.26 57.34 ...
##  $ age      : int  52 63 46 58 49 45 38 58 29 53 ...
##  $ chd      : Factor w/ 2 levels "No","Si": 2 2 1 2 2 1 1 2 1 2 ...
summary(SAheart)
##       sbp           tobacco             ldl           adiposity    
##  Min.   :101.0   Min.   : 0.0000   Min.   : 0.980   Min.   : 6.74  
##  1st Qu.:124.0   1st Qu.: 0.0525   1st Qu.: 3.283   1st Qu.:19.77  
##  Median :134.0   Median : 2.0000   Median : 4.340   Median :26.11  
##  Mean   :138.3   Mean   : 3.6356   Mean   : 4.740   Mean   :25.41  
##  3rd Qu.:148.0   3rd Qu.: 5.5000   3rd Qu.: 5.790   3rd Qu.:31.23  
##  Max.   :218.0   Max.   :31.2000   Max.   :15.330   Max.   :42.49  
##     famhist        typea         obesity         alcohol      
##  Absent :270   Min.   :13.0   Min.   :14.70   Min.   :  0.00  
##  Present:192   1st Qu.:47.0   1st Qu.:22.98   1st Qu.:  0.51  
##                Median :53.0   Median :25.80   Median :  7.51  
##                Mean   :53.1   Mean   :26.04   Mean   : 17.04  
##                3rd Qu.:60.0   3rd Qu.:28.50   3rd Qu.: 23.89  
##                Max.   :78.0   Max.   :46.58   Max.   :147.19  
##       age        chd     
##  Min.   :15.00   No:302  
##  1st Qu.:31.00   Si:160  
##  Median :45.00           
##  Mean   :42.82           
##  3rd Qu.:55.00           
##  Max.   :64.00
cor(SAheart$tobacco, SAheart$alcohol)
## [1] 0.2008134
plot(SAheart$tobacco,SAheart$alcohol)

cor(SAheart$obesity, SAheart$alcohol)
## [1] 0.05161957
plot(SAheart$obesity,SAheart$alcohol)

cor(SAheart$age, SAheart$alcohol)
## [1] 0.1011246
plot(SAheart$age,SAheart$alcohol)

Punto 8 Instalar paquetes install.packages(“PAQUETE A INSTALAR”)

Ejemplos

knitr(para guardar sitaxis)

corrplot (para hacer correlaciones entre variables)

ggplot2 (para mejorar estetica de gráficos)

#Tomamos una base pre-existente 



iris
##     Sepal.Length Sepal.Width Petal.Length Petal.Width    Species
## 1            5.1         3.5          1.4         0.2     setosa
## 2            4.9         3.0          1.4         0.2     setosa
## 3            4.7         3.2          1.3         0.2     setosa
## 4            4.6         3.1          1.5         0.2     setosa
## 5            5.0         3.6          1.4         0.2     setosa
## 6            5.4         3.9          1.7         0.4     setosa
## 7            4.6         3.4          1.4         0.3     setosa
## 8            5.0         3.4          1.5         0.2     setosa
## 9            4.4         2.9          1.4         0.2     setosa
## 10           4.9         3.1          1.5         0.1     setosa
## 11           5.4         3.7          1.5         0.2     setosa
## 12           4.8         3.4          1.6         0.2     setosa
## 13           4.8         3.0          1.4         0.1     setosa
## 14           4.3         3.0          1.1         0.1     setosa
## 15           5.8         4.0          1.2         0.2     setosa
## 16           5.7         4.4          1.5         0.4     setosa
## 17           5.4         3.9          1.3         0.4     setosa
## 18           5.1         3.5          1.4         0.3     setosa
## 19           5.7         3.8          1.7         0.3     setosa
## 20           5.1         3.8          1.5         0.3     setosa
## 21           5.4         3.4          1.7         0.2     setosa
## 22           5.1         3.7          1.5         0.4     setosa
## 23           4.6         3.6          1.0         0.2     setosa
## 24           5.1         3.3          1.7         0.5     setosa
## 25           4.8         3.4          1.9         0.2     setosa
## 26           5.0         3.0          1.6         0.2     setosa
## 27           5.0         3.4          1.6         0.4     setosa
## 28           5.2         3.5          1.5         0.2     setosa
## 29           5.2         3.4          1.4         0.2     setosa
## 30           4.7         3.2          1.6         0.2     setosa
## 31           4.8         3.1          1.6         0.2     setosa
## 32           5.4         3.4          1.5         0.4     setosa
## 33           5.2         4.1          1.5         0.1     setosa
## 34           5.5         4.2          1.4         0.2     setosa
## 35           4.9         3.1          1.5         0.2     setosa
## 36           5.0         3.2          1.2         0.2     setosa
## 37           5.5         3.5          1.3         0.2     setosa
## 38           4.9         3.6          1.4         0.1     setosa
## 39           4.4         3.0          1.3         0.2     setosa
## 40           5.1         3.4          1.5         0.2     setosa
## 41           5.0         3.5          1.3         0.3     setosa
## 42           4.5         2.3          1.3         0.3     setosa
## 43           4.4         3.2          1.3         0.2     setosa
## 44           5.0         3.5          1.6         0.6     setosa
## 45           5.1         3.8          1.9         0.4     setosa
## 46           4.8         3.0          1.4         0.3     setosa
## 47           5.1         3.8          1.6         0.2     setosa
## 48           4.6         3.2          1.4         0.2     setosa
## 49           5.3         3.7          1.5         0.2     setosa
## 50           5.0         3.3          1.4         0.2     setosa
## 51           7.0         3.2          4.7         1.4 versicolor
## 52           6.4         3.2          4.5         1.5 versicolor
## 53           6.9         3.1          4.9         1.5 versicolor
## 54           5.5         2.3          4.0         1.3 versicolor
## 55           6.5         2.8          4.6         1.5 versicolor
## 56           5.7         2.8          4.5         1.3 versicolor
## 57           6.3         3.3          4.7         1.6 versicolor
## 58           4.9         2.4          3.3         1.0 versicolor
## 59           6.6         2.9          4.6         1.3 versicolor
## 60           5.2         2.7          3.9         1.4 versicolor
## 61           5.0         2.0          3.5         1.0 versicolor
## 62           5.9         3.0          4.2         1.5 versicolor
## 63           6.0         2.2          4.0         1.0 versicolor
## 64           6.1         2.9          4.7         1.4 versicolor
## 65           5.6         2.9          3.6         1.3 versicolor
## 66           6.7         3.1          4.4         1.4 versicolor
## 67           5.6         3.0          4.5         1.5 versicolor
## 68           5.8         2.7          4.1         1.0 versicolor
## 69           6.2         2.2          4.5         1.5 versicolor
## 70           5.6         2.5          3.9         1.1 versicolor
## 71           5.9         3.2          4.8         1.8 versicolor
## 72           6.1         2.8          4.0         1.3 versicolor
## 73           6.3         2.5          4.9         1.5 versicolor
## 74           6.1         2.8          4.7         1.2 versicolor
## 75           6.4         2.9          4.3         1.3 versicolor
## 76           6.6         3.0          4.4         1.4 versicolor
## 77           6.8         2.8          4.8         1.4 versicolor
## 78           6.7         3.0          5.0         1.7 versicolor
## 79           6.0         2.9          4.5         1.5 versicolor
## 80           5.7         2.6          3.5         1.0 versicolor
## 81           5.5         2.4          3.8         1.1 versicolor
## 82           5.5         2.4          3.7         1.0 versicolor
## 83           5.8         2.7          3.9         1.2 versicolor
## 84           6.0         2.7          5.1         1.6 versicolor
## 85           5.4         3.0          4.5         1.5 versicolor
## 86           6.0         3.4          4.5         1.6 versicolor
## 87           6.7         3.1          4.7         1.5 versicolor
## 88           6.3         2.3          4.4         1.3 versicolor
## 89           5.6         3.0          4.1         1.3 versicolor
## 90           5.5         2.5          4.0         1.3 versicolor
## 91           5.5         2.6          4.4         1.2 versicolor
## 92           6.1         3.0          4.6         1.4 versicolor
## 93           5.8         2.6          4.0         1.2 versicolor
## 94           5.0         2.3          3.3         1.0 versicolor
## 95           5.6         2.7          4.2         1.3 versicolor
## 96           5.7         3.0          4.2         1.2 versicolor
## 97           5.7         2.9          4.2         1.3 versicolor
## 98           6.2         2.9          4.3         1.3 versicolor
## 99           5.1         2.5          3.0         1.1 versicolor
## 100          5.7         2.8          4.1         1.3 versicolor
## 101          6.3         3.3          6.0         2.5  virginica
## 102          5.8         2.7          5.1         1.9  virginica
## 103          7.1         3.0          5.9         2.1  virginica
## 104          6.3         2.9          5.6         1.8  virginica
## 105          6.5         3.0          5.8         2.2  virginica
## 106          7.6         3.0          6.6         2.1  virginica
## 107          4.9         2.5          4.5         1.7  virginica
## 108          7.3         2.9          6.3         1.8  virginica
## 109          6.7         2.5          5.8         1.8  virginica
## 110          7.2         3.6          6.1         2.5  virginica
## 111          6.5         3.2          5.1         2.0  virginica
## 112          6.4         2.7          5.3         1.9  virginica
## 113          6.8         3.0          5.5         2.1  virginica
## 114          5.7         2.5          5.0         2.0  virginica
## 115          5.8         2.8          5.1         2.4  virginica
## 116          6.4         3.2          5.3         2.3  virginica
## 117          6.5         3.0          5.5         1.8  virginica
## 118          7.7         3.8          6.7         2.2  virginica
## 119          7.7         2.6          6.9         2.3  virginica
## 120          6.0         2.2          5.0         1.5  virginica
## 121          6.9         3.2          5.7         2.3  virginica
## 122          5.6         2.8          4.9         2.0  virginica
## 123          7.7         2.8          6.7         2.0  virginica
## 124          6.3         2.7          4.9         1.8  virginica
## 125          6.7         3.3          5.7         2.1  virginica
## 126          7.2         3.2          6.0         1.8  virginica
## 127          6.2         2.8          4.8         1.8  virginica
## 128          6.1         3.0          4.9         1.8  virginica
## 129          6.4         2.8          5.6         2.1  virginica
## 130          7.2         3.0          5.8         1.6  virginica
## 131          7.4         2.8          6.1         1.9  virginica
## 132          7.9         3.8          6.4         2.0  virginica
## 133          6.4         2.8          5.6         2.2  virginica
## 134          6.3         2.8          5.1         1.5  virginica
## 135          6.1         2.6          5.6         1.4  virginica
## 136          7.7         3.0          6.1         2.3  virginica
## 137          6.3         3.4          5.6         2.4  virginica
## 138          6.4         3.1          5.5         1.8  virginica
## 139          6.0         3.0          4.8         1.8  virginica
## 140          6.9         3.1          5.4         2.1  virginica
## 141          6.7         3.1          5.6         2.4  virginica
## 142          6.9         3.1          5.1         2.3  virginica
## 143          5.8         2.7          5.1         1.9  virginica
## 144          6.8         3.2          5.9         2.3  virginica
## 145          6.7         3.3          5.7         2.5  virginica
## 146          6.7         3.0          5.2         2.3  virginica
## 147          6.3         2.5          5.0         1.9  virginica
## 148          6.5         3.0          5.2         2.0  virginica
## 149          6.2         3.4          5.4         2.3  virginica
## 150          5.9         3.0          5.1         1.8  virginica
correlacion<-cor(iris[,-5])
correlacion
##              Sepal.Length Sepal.Width Petal.Length Petal.Width
## Sepal.Length    1.0000000  -0.1175698    0.8717538   0.8179411
## Sepal.Width    -0.1175698   1.0000000   -0.4284401  -0.3661259
## Petal.Length    0.8717538  -0.4284401    1.0000000   0.9628654
## Petal.Width     0.8179411  -0.3661259    0.9628654   1.0000000
#Convocamos librería

library(corrplot)
## Warning: package 'corrplot' was built under R version 3.3.3
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.3.3
corrplot(correlacion)

corrplot(correlacion, method="shade")

corrplot(correlacion, method="number")

qplot(Petal.Length,Sepal.Width,geom="point", data=iris, colour=Species)

boxplot(iris[,-5])

9 Tablas de contingencia

library(foreign)
## Warning: package 'foreign' was built under R version 3.3.3
#Frecuencia simple

Tabla<-table(iris$Species)
prop.table(Tabla)
## 
##     setosa versicolor  virginica 
##  0.3333333  0.3333333  0.3333333
prop.table(Tabla)*100
## 
##     setosa versicolor  virginica 
##   33.33333   33.33333   33.33333
#Armar tramos en variables continuas

Sepalo.tramos <-cut(iris$Sepal.Length,breaks=c(4,5,6,7,8))
Iris1<- cbind(iris, Sepalo.tramos)

#Tabla de Contingencia

Tabla.tramos<-table(Iris1$Species,Iris1$Sepalo.tramos)
prop.table(Tabla.tramos)*100
##             
##                   (4,5]      (5,6]      (6,7]      (7,8]
##   setosa     18.6666667 14.6666667  0.0000000  0.0000000
##   versicolor  2.0000000 18.0000000 13.3333333  0.0000000
##   virginica   0.6666667  5.3333333 19.3333333  8.0000000