top of page
Search
bigdatadg00

Analisis descrptivo

Updated: Apr 28, 2021

Analisis realizado en r

graficos basicos

Codigo:

> str(b)

'data.frame': 332 obs. of 8 variables:

$ npreg: int 6 1 1 3 2 5 0 1 3 9 ...

$ glu : int 148 85 89 78 197 166 118 103 126 119 ...

$ bp : int 72 66 66 50 70 72 84 30 88 80 ...

$ skin : int 35 29 23 32 45 19 47 38 41 35 ...

$ bmi : num 33.6 26.6 28.1 31 30.5 25.8 45.8 43.3 39.3 29 ...

$ ped : num 0.627 0.351 0.167 0.248 0.158 0.587 0.551 0.183 0.704 0.263 ...

$ age : int 50 31 21 26 53 51 31 33 27 29 ...

$ type : chr "Yes" "No" "No" "Yes" ...

>

> par(mfrow=c(4,2))

>

> barplot(table(as.factor(b$npreg)),col=brewer.pal(8,"PuOr"),

+ main='Numero de embarazos')

>

> with(b, Hist(glu, col=brewer.pal(8,"PuOr"),scale="frequency",

+ breaks="Sturges",main='Concentración de glucosa'))

>

> with(b, Hist(bp, col=brewer.pal(8,"PuOr"),scale="frequency",

+ breaks="Sturges",main='Presión arterial diastólica'))

>

> with(b, Hist(skin, col=brewer.pal(8,"PuOr"),scale="frequency",

+ breaks="Sturges",main='Espesor del pliegue de la piel del tríceps'))

>

> with(b, Hist(bmi, col=brewer.pal(8,"PuOr"),scale="frequency",

+ breaks="Sturges",main='Indice de masa corporal'))

>

> with(b, Hist(ped, col=brewer.pal(8,"PuOr"),scale="frequency",

+ breaks="Sturges",

+ main='Función del pedigrí de la diabetes.'))

>

> with(b, Hist(age, col=brewer.pal(8,"PuOr"),scale="frequency",

+ breaks="Sturges",main='Edad'))

>

> pie(table(b$type),col=brewer.pal(3,"PuOr"),main = 'Sí o No, para diabéticos')

>

>

> # boxplot

>

> par(mfrow=c(2,3))

>

>

> with(b, boxplot(glu, col='#b35806',scale="frequency",

+ breaks="Sturges",main='Concentración de glucosa'))

>

> with(b, boxplot(bp, col='#f1a340',scale="frequency",

+ breaks="Sturges",main='Presión arterial diastólica'))

>

> with(b, boxplot(skin, col='#fee0b6',scale="frequency",

+ breaks="Sturges",main='Espesor del pliegue de la piel del tríceps'))

>

> with(b, boxplot(bmi, col='#d8daeb',scale="frequency",

+ breaks="Sturges",main='Indice de masa corporal'))

>

> with(b, boxplot(ped, col='#998ec3',scale="frequency",

+ breaks="Sturges",

+ main='Función del pedigrí de la diabetes.'))

>

> with(b, boxplot(age, col='#542788',scale="frequency",

+ breaks="Sturges",main='Edad'))

Boxplot


13 views0 comments

Recent Posts

See All

댓글


bottom of page