Running ‘testthat.R’ [18s/59s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(socialmixr)
  
  Attaching package: 'socialmixr'
  
  The following object is masked from 'package:utils':
  
      cite
  
  > 
  > test_check("socialmixr")
  ── 1. Error: surveys can be downloaded (@test-surveys.r#11)  ───────────────────
  subscript out of bounds
  1: expect_true(class(suppressWarnings(get_survey(1))) == "survey") at testthat/test-surveys.r:11
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: suppressWarnings(get_survey(1))
  5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  6: get_survey(1)
  7: fromJSON(xmlValue(xpathSApply(htmlParse(temp_body), "//script[@type=\"application/ld+json\"]")[[1]]))
  8: xmlValue(xpathSApply(htmlParse(temp_body), "//script[@type=\"application/ld+json\"]")[[1]])
  
  
  To cite POLYMOD social contact data in publications use:
  
  Mossong J, Hens N, Jit M, Beutels P, Auranen K, Mikolajczyk R, Massari
  M, Salmaso S, Tomba GS, Wallinga J, Heijne J, Sadkowska-Todys M,
  Rosinska M, Edmunds WJ (2017). "POLYMOD social contact data." doi:
  10.5281/zenodo.1157934 (URL: https://doi.org/10.5281/zenodo.1157934),
  Version 1.1.
  
  A BibTeX entry for LaTeX users is
  
    @Misc{,
      title = {POLYMOD social contact data},
      author = {Joel Mossong and Niel Hens and Mark Jit and Philippe Beutels and Kari Auranen and Rafael Mikolajczyk and Marco Massari and Stefania Salmaso and Gianpaolo Scalia Tomba and Jacco Wallinga and Janneke Heijne and Malgorzata Sadkowska-Todys and Magdalena Rosinska and W. John Edmunds},
      doi = {https://doi.org/10.5281/zenodo.1157934},
      note = {Version 1.1},
      year = {2017},
    }
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 36 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
  1. Error: surveys can be downloaded (@test-surveys.r#11) 
  
  Error: testthat unit tests failed
  Execution halted