Running ‘testthat.R’ [12s/83s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(casen)
  > 
  > test_check("casen")
  ── 1. Failure: media_agrupada works properly (@test-descriptive_statistics.R#7) 
  `str\(est\)` does not match "7 variables".
  Actual value: "tibble \[12 × 7\] \(S3: tbl_df/tbl/data\.frame\)\\n \$ comuna_etiqueta   : chr \[1:12\] "Valdivia" "Valdivia" "Los Lagos" "Los Lagos" \.\.\.\\n \$ sexo_etiqueta     : chr \[1:12\] "Mujer" "Hombre" "Hombre" "Mujer" \.\.\.\\n \$ comuna_codigo     : chr \[1:12\] "14101" "14101" "14104" "14104" \.\.\.\\n \$ sexo_codigo       : chr \[1:12\] "2" "1" "1" "2" \.\.\.\\n \$ media_ytotcorh    : num \[1:12\] 1262564 1347409 718525 730578 707612 \.\.\.\\n \$ media_ytotcorh_inf: num \[1:12\] 1029280 1071398 638768 640483 423210 \.\.\.\\n \$ media_ytotcorh_sup: num \[1:12\] 1495849 1623420 798282 820674 992014 \.\.\."
  
  ── 2. Failure: mediana_agrupada works properly (@test-descriptive_statistics.R#1
  `str\(est\)` does not match "7 variables".
  Actual value: "tibble \[12 × 7\] \(S3: tbl_df/tbl/data\.frame\)\\n \$ comuna_etiqueta     : chr \[1:12\] "Valdivia" "Valdivia" "Los Lagos" "Los Lagos" \.\.\.\\n \$ sexo_etiqueta       : chr \[1:12\] "Mujer" "Hombre" "Hombre" "Mujer" \.\.\.\\n \$ comuna_codigo       : chr \[1:12\] "14101" "14101" "14104" "14104" \.\.\.\\n \$ sexo_codigo         : chr \[1:12\] "2" "1" "1" "2" \.\.\.\\n \$ mediana_ytotcorh    : num \[1:12\] 900000 914376 612354 635936 553684 \.\.\.\\n \$ mediana_ytotcorh_inf: num \[1:12\] 791293 809302 577774 582273 444358 \.\.\.\\n \$ mediana_ytotcorh_sup: num \[1:12\] 1005000 1047226 637334 653931 692418 \.\.\."
  
  ── 3. Failure: percentiles_agrupados works properly (@test-descriptive_statistic
  `str\(est\)` does not match "7 variables".
  Actual value: "tibble \[12 × 7\] \(S3: tbl_df/tbl/data\.frame\)\\n \$ percentil               : num \[1:12\] 0\.7 0\.7 0\.7 0\.7 0\.7 0\.7 0\.7 0\.7 0\.7 0\.7 \.\.\.\\n \$ comuna_etiqueta         : chr \[1:12\] "Valdivia" "Valdivia" "Los Lagos" "Los Lagos" \.\.\.\\n \$ sexo_etiqueta           : chr \[1:12\] "Mujer" "Hombre" "Hombre" "Mujer" \.\.\.\\n \$ comuna_codigo           : chr \[1:12\] "14101" "14101" "14104" "14104" \.\.\.\\n \$ sexo_codigo             : chr \[1:12\] "2" "1" "1" "2" \.\.\.\\n \$ mediana_ytotcorh        : num \[1:12\] 1266142 1300000 853001 853162 796676 \.\.\.\\n \$ mediana_ytotcorh_err_est: num \[1:12\] 102259 102396 31364 49559 185537 \.\.\."
  
  trying URL 'http://observatorio.ministeriodesarrollosocial.gob.cl/casen/layout/doc/bases/Casen1990.zip'
  Content type 'application/zip' length 4992227 bytes (4.8 MB)
  ==================================================
  downloaded 4.8 MB
  
  trying URL 'https://pachamaltese.github.io/casen/data-rds/1990.rds'
  Content type 'application/octet-stream' length 2890424 bytes (2.8 MB)
  ==================================================
  downloaded 2.8 MB
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 7 | SKIPPED: 0 | WARNINGS: 4 | FAILED: 3 ]
  1. Failure: media_agrupada works properly (@test-descriptive_statistics.R#7) 
  2. Failure: mediana_agrupada works properly (@test-descriptive_statistics.R#14) 
  3. Failure: percentiles_agrupados works properly (@test-descriptive_statistics.R#21) 
  
  Error: testthat unit tests failed
  Execution halted