1 Libreria

library(ggplot2) # libreria de graficas
## Warning: package 'ggplot2' was built under R version 4.3.3

2 Estadistica.

nombre<-c("Maura", "Camila", "Johan_s", "Elkin", "Alejandro", "Yandry", "Nicolas", "Dirley", "William", "Daniela", "Steven", "Yuliana", "Karen", "Jose", "Santiago", "Johan", "Santiago", "Daniela")
edad<-c(20, 21, 21, 18, 17, 19, 20, 19, 24, 18, 22, 20, 19, 21, 20, 19, 20, 19)
promedio<-c(3.5, 3.5, 3.5, 3.3, 3.3, 3.92, 3.74, 3.6, 3.5, 3.2, 3.3, 3.3, 3.5, 3.4, 3.5, 3.9, 3.7, 3.7)
semestre<-c(7, 8, 7, 3, 3, 7, 7, 7, 10, 7, 6, 8, 7, 7, 5, 5, 6, 5)
esta_nivelado<-c("si", "no", "no", "no", "no", "si", "si", "no", "no", "no", "no", "no", "no", "no", "no", "si", "no", "si")

datos<-data.frame(Estudiantes = nombre, edad, promedio, semestre, esta_nivelado)

print(datos) 
##    Estudiantes edad promedio semestre esta_nivelado
## 1        Maura   20     3.50        7            si
## 2       Camila   21     3.50        8            no
## 3      Johan_s   21     3.50        7            no
## 4        Elkin   18     3.30        3            no
## 5    Alejandro   17     3.30        3            no
## 6       Yandry   19     3.92        7            si
## 7      Nicolas   20     3.74        7            si
## 8       Dirley   19     3.60        7            no
## 9      William   24     3.50       10            no
## 10     Daniela   18     3.20        7            no
## 11      Steven   22     3.30        6            no
## 12     Yuliana   20     3.30        8            no
## 13       Karen   19     3.50        7            no
## 14        Jose   21     3.40        7            no
## 15    Santiago   20     3.50        5            no
## 16       Johan   19     3.90        5            si
## 17    Santiago   20     3.70        6            no
## 18     Daniela   19     3.70        5            si

2.1 Graficas

Ahora bien, tambien podemos exportar o gruardar nuestras graficas ya creadas (de las graficas anterioes ya vistas).

  1. ya lista la grafica en el codigo, aparece una cepcion de herramientas

  2. vamos a la herramienta exportar(export)

  3. Al tomar esta opcion, se disponen dos opciones para exportar el documento (save as imagine file ý save as PDF file )

  4. para cualquiera de las opciones debemos elegir donde lo guardamos y el tipo de documento y si queremos cambiamos el nombre.

ahora otro modo para exportar o guardar la imagen, entonces.

  1. le damos en la barra de heramientas (zoom) clic derecho y luego guardar

(probemos esto luego)

2.1.1 Uso de las grficas correspondientes

llenar(si o si)

2.2 ahora vamos a cargar datos de una pagina wed

url <- ('https://raw.githubusercontent.com/fhernanb/datos/master/babies.txt')

Data_de_la_wed <- read.table(url, header = TRUE, sep = '\t')

ncol(Data_de_la_wed) # numero de columnas
## [1] 7
head(Data_de_la_wed, n = 4) # para imprimir una cantidad limitada de los datos
##   bwt gestation     parity age height weight smoke
## 1 120       284 First born  27     62    100   Not
## 2 113       282 First born  33     64    135   Not
## 3 128       279 First born  28     64    115   Yes
## 4 123        NA First born  36     69    190   Not
summary(Data_de_la_wed)
##       bwt          gestation        parity               age       
##  Min.   : 55.0   Min.   :148.0   Length:1236        Min.   :15.00  
##  1st Qu.:108.8   1st Qu.:272.0   Class :character   1st Qu.:23.00  
##  Median :120.0   Median :280.0   Mode  :character   Median :26.00  
##  Mean   :119.6   Mean   :279.3                      Mean   :27.26  
##  3rd Qu.:131.0   3rd Qu.:288.0                      3rd Qu.:31.00  
##  Max.   :176.0   Max.   :353.0                      Max.   :45.00  
##                  NA's   :13                         NA's   :2      
##      height          weight         smoke          
##  Min.   :53.00   Min.   : 87.0   Length:1236       
##  1st Qu.:62.00   1st Qu.:114.8   Class :character  
##  Median :64.00   Median :125.0   Mode  :character  
##  Mean   :64.05   Mean   :128.6                     
##  3rd Qu.:66.00   3rd Qu.:139.0                     
##  Max.   :72.00   Max.   :250.0                     
##  NA's   :22      NA's   :36
str(Data_de_la_wed)
## 'data.frame':    1236 obs. of  7 variables:
##  $ bwt      : int  120 113 128 123 108 136 138 132 120 143 ...
##  $ gestation: int  284 282 279 NA 282 286 244 245 289 299 ...
##  $ parity   : chr  "First born" "First born" "First born" "First born" ...
##  $ age      : int  27 33 28 36 23 25 33 23 25 30 ...
##  $ height   : int  62 64 64 69 67 62 62 65 62 66 ...
##  $ weight   : int  100 135 115 190 125 93 178 140 125 136 ...
##  $ smoke    : chr  "Not" "Not" "Yes" "Not" ...

3 pagina wed

El siguiente url es la informacion de la data o base de datos ((dplyr))

https://fhernanb.github.io/Manual-de-R/estad%C3%ADstica-descriptiva-con-dplyr.html