@@ -144,9 +144,9 @@ se obtiene el siguiente resultado:
144144── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
145145✔ dplyr 1.1.4 ✔ readr 2.1.5
146146✔ forcats 1.0.0 ✔ stringr 1.5.1
147- ✔ ggplot2 3.5.2 ✔ tibble 3.2.1
147+ ✔ ggplot2 3.5.2 ✔ tibble 3.3.0
148148✔ lubridate 1.9.4 ✔ tidyr 1.3.1
149- ✔ purrr 1.0.4
149+ ✔ purrr 1.1.0
150150── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
151151✖ dplyr::filter() masks stats::filter()
152152✖ dplyr::lag() masks stats::lag()
@@ -1026,13 +1026,20 @@ covid %>%
10261026 cleanepi :: standardize_dates()
10271027```
10281028
1029+ ``` output
1030+ ! Detected 1 value that complies with multiple formats and no values that are
1031+ outside of the specified time frame.
1032+ ℹ Enter `print_report(data = dat, "date_standardization")` to access it, where
1033+ "dat" is the object used to store the output from this operation.
1034+ ```
1035+
10291036``` output
10301037 fecha_reporte_web
103110381 2021-03-15
1032- 2 2021 -03-23
1039+ 2 2023 -03-21
103310403 2021-03-15
1034- 4 2021-01-20
1035- 5 2021-01-15
1041+ 4 2021-03-01
1042+ 5 <NA>
103610436 <NA>
103710447 2022-01-28
103810458 2022-07-07
@@ -1055,6 +1062,13 @@ covid <- covid %>%
10551062 target_columns = " fecha_reporte_web" )
10561063```
10571064
1065+ ``` output
1066+ ! Detected 28365 values that comply with multiple formats and no values that
1067+ are outside of the specified time frame.
1068+ ℹ Enter `print_report(data = dat, "date_standardization")` to access them,
1069+ where "dat" is the object used to store the output from this operation.
1070+ ```
1071+
10581072##### ** NAs relacionados con errores en la escritura de números**
10591073
10601074En algunos casos pueden ocurrir errores en la recolección que no se
@@ -1389,7 +1403,7 @@ covid <- covid %>%
13891403
13901404``` output
13911405! Found 2391 duplicated rows in the dataset.
1392- ℹ Use `attr (dat, "report")[["duplicated_rows"]] ` to access them, where "dat" is
1406+ ℹ Use `print_report (dat, "found_duplicates") ` to access them, where "dat" is
13931407 the object used to store the output from this operation.
13941408```
13951409
@@ -1436,7 +1450,7 @@ covid <- covid %>%
14361450
14371451``` output
14381452! Found 2010 duplicated rows in the dataset.
1439- ℹ Use `attr (dat, "report")[["duplicated_rows"]] ` to access them, where "dat" is
1453+ ℹ Use `print_report (dat, "found_duplicates") ` to access them, where "dat" is
14401454 the object used to store the output from this operation.
14411455```
14421456
@@ -1598,7 +1612,7 @@ covid %>%
15981612```
15991613
16001614``` output
1601- [1] 25
1615+ [1] 24
16021616```
16031617
16041618#### ** 3.2.8. Verificación de valores atípicos**
@@ -1726,17 +1740,17 @@ se obtiene el siguiente resultado:
17261740
17271741
17281742``` output
1729- # A tibble: 1 × 25
1743+ # A tibble: 1 × 24
17301744 fecha_reporte_web id_de_caso fecha_de_notificacion edad sexo
17311745 <date> <int> <chr> <int> <fct>
173217461 1970-01-01 1631715 21/12/2020 24 F
1733- # ℹ 20 more variables: ubicacion_del_caso <chr>, estado <chr>,
1747+ # ℹ 19 more variables: ubicacion_del_caso <chr>, estado <chr>,
17341748# recuperado <chr>, fecha_de_inicio_de_sintomas <chr>, fecha_de_muerte <chr>,
17351749# fecha_de_diagnostico <chr>, fecha_de_recuperacion <chr>,
17361750# tipo_de_recuperacion <chr>, fecha_de_nacimiento <dbl>,
17371751# nombre_del_pais <fct>, sintomas <fct>, edad_repetida <int>,
17381752# num_hos_rec <dbl>, tension_sistolica <chr>, tension_diastolica <chr>,
1739- # vacunado <lgl>, talla <dbl>, peso <dbl>, edad_en_dias <dbl>, row_id <int>
1753+ # vacunado <lgl>, talla <dbl>, peso <dbl>, edad_en_dias <dbl>
17401754```
17411755
17421756Una vez identificados los datos, podemos corregirlos reemplazándolos por
@@ -1790,7 +1804,7 @@ covid %>%
17901804``` output
17911805.
17921806 Casa Fallecido Hospital Hospital UCI <NA>
1793- 74851 1726 12 1 407
1807+ 74850 1726 12 1 407
17941808```
17951809
17961810** Instrucción** : Filtre la variable ` ubicacion_del_caso ` para excluir
@@ -1815,7 +1829,7 @@ covid %>%
18151829``` output
18161830.
18171831 Casa Fallecido Hospital Hospital UCI <NA>
1818- 74851 1726 12 1 0
1832+ 74850 1726 12 1 0
18191833```
18201834
18211835Como puede observar ahora los NA son 0.
@@ -1855,7 +1869,7 @@ covid %>%
18551869``` output
18561870.
18571871 F M <NA>
1858- 40962 35628 0
1872+ 40962 35627 0
18591873```
18601874
18611875::: callout
@@ -1892,7 +1906,7 @@ covid %>%
18921906``` output
18931907.
18941908masculino femenino <NA>
1895- 35628 40962 0
1909+ 35627 40962 0
18961910```
18971911
18981912
0 commit comments