Running 'testthat.R' [77s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(cthist)
  > 
  > test_check("cthist")
  NCT02586649 - 4 of 4
  2025-08-29 15:31:43.129631 NCT02586649 processed (4 versions, 100%)
  Rows: 1 Columns: 29
  -- Column specification --------------------------------------------------------
  Delimiter: ","
  chr  (20): nctid, overall_status, study_start_date_precision, primary_comple...
  dbl   (3): version_number, total_versions, enrolment
  lgl   (3): accepts_healthy_volunteers, whystopped, results_posted
  date  (3): version_date, study_start_date, primary_completion_date
  
  i Use `spec()` to retrieve the full column specification for this data.
  i Specify the column types or set `show_col_types = FALSE` to quiet this message.
  NCT04338971 - 1 of 4
  NCT04338971 - 2 of 4
  Version caused a warning: NCT04338971 version 2
  Here's the original warning message:
  simpleWarning in open.connection(con, "rb"): URL 'https://clinicaltrials.gov/api/int/studies/NCT04338971/history/2': Timeout of 60 seconds was reached
   
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 29 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-clinicaltrials_gov_version_criteria.R:9:9'): ClinicalTrials.gov criteria downloads correctly ──
  version$criteria (`actual`) not equal to "<p>Inclusion Criteria (MCI patients):</p><ul><li>right handedness</li><li><p>amnestic and amnestic plus MCI with:</p><ol><li>subjective memory impairment;</li><li>objective memory difficulties, at least 1 SD below gender, age and education adjusted standard values;</li><li>relatively normal performance in other cognitive domains;</li><li>no constraints in activities of daily livings</li><li>age: 50-90 years</li></ol></li></ul><p>Exclusion Criteria:</p><ul><li>severe internal or psychiatric disease</li><li>epilepsy</li><li>other severe neurological diseases, e.g. previous major stroke or brain tumor</li><li>DMS-IV manifest dementia</li><li>contraindication for MRT (claustrophobia, metallic implants, tattoos)</li></ul>" (`expected`).
  
  lines(actual) vs lines(expected)
  - "<p>Inclusion Criteria (MCI patients):</p><ul><li>right handedness</li><li><p>amnestic and amnestic plus MCI with:</p><ol><li>subjective memory impairment;</li><li>objective memory difficulties, at least 1 SD below gender, age and education adjusted standard values;</li><li>relatively normal performance in other cognitive domains;</li><li>no constraints in activities of daily livings</li><li>age: 50-90 years</li></ol></li></ul><p>Exclusion Criteria:</p><ul><li>severe internal or psychiatric disease</li><li>epilepsy</li><li>other severe neurological diseases, e.g."
  - "previous major stroke or brain tumor</li><li>DMS-IV manifest dementia</li><li>contraindication for MRT (claustrophobia, metallic implants, tattoos)</li></ul>"
  + "<p>Inclusion Criteria (MCI patients):</p><ul><li>right handedness</li><li><p>amnestic and amnestic plus MCI with:</p><ol><li>subjective memory impairment;</li><li>objective memory difficulties, at least 1 SD below gender, age and education adjusted standard values;</li><li>relatively normal performance in other cognitive domains;</li><li>no constraints in activities of daily livings</li><li>age: 50-90 years</li></ol></li></ul><p>Exclusion Criteria:</p><ul><li>severe internal or psychiatric disease</li><li>epilepsy</li><li>other severe neurological diseases, e.g. previous major stroke or brain tumor</li><li>DMS-IV manifest dementia</li><li>contraindication for MRT (claustrophobia, metallic implants, tattoos)</li></ul>"
  ── Error ('test-overall_status_lengths.R:2:5'): Overall status lengths parse correctly ──
  Error in `versiondata$ostatus`: $ operator is invalid for atomic vectors
  Backtrace:
      ▆
   1. ├─cthist::clinicaltrials_gov_download("NCT04338971") at test-overall_status_lengths.R:2:5
   2. │ ├─... %>% ...
   3. │ └─tibble::tribble(...)
   4. │   └─tibble:::extract_frame_data_from_dots(...)
   5. │     └─rlang::list2(...)
   6. └─readr::write_csv(., file = output_filename, append = TRUE)
   7.   └─readr::write_delim(...)
   8.     ├─base::stopifnot(is.data.frame(x))
   9.     └─base::is.data.frame(x)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 29 ]
  Error: Test failures
  Execution halted