Running ‘testthat.R’ [9s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(lingmatch)
  Loading required package: Matrix
  > 
  > test_check("lingmatch")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  ● embeddings files not downloaded (1)
  ● not downloading dictionary or embeddings files (1)
  ● raw embeddings test files not present in /home/hornik/Latent Semantic Spaces/ from /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/lingmatch.Rcheck/tests/testthat (1)
  ● term map not present (1)
  ● texts.txt not found in /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-lma_weight.R:17:3): weights are the same as manual ────────────
  as.numeric(lma_weight(dtm, "dflog", normalize = FALSE, doc.only = TRUE)) not identical to as.numeric(log(colSums(dtm > 0), log.base)).
  1/100 mismatches
  [3] 0 - -Inf == Inf
  ── Failure (test-lma_weight.R:33:3): weights are the same as manual ────────────
  as.numeric(lma_weight(dtm, "dfmlog", normalize = FALSE, doc.only = TRUE)) not identical to as.numeric(log(diag(dtm[max.col(t(dtm)), ]), log.base)).
  1/100 mismatches
  [3] 0 - -Inf == Inf
  ── Failure (test-lma_weight.R:45:3): weights are the same as manual ────────────
  as.numeric(lma_weight(dtm, "idf", normalize = FALSE, doc.only = TRUE)) not identical to as.numeric(log(nrow(dtm)/colSums(dtm > 0), log.base)).
  1/100 mismatches
  [3] 0 - Inf == -Inf
  ── Failure (test-lma_weight.R:54:3): weights are the same as manual ────────────
  as.numeric(lma_weight(dtm, "normal", normalize = FALSE, doc.only = TRUE)) not identical to as.numeric(sqrt(1/colSums(dtm^2))).
  1/100 mismatches
  [3] 0 - Inf == -Inf
  ── Failure (test-lma_weight.R:89:3): term-document weighting works ─────────────
  log10(nrow(dtm)/colSums(dtm != 0, na.rm = TRUE)) not equal to `idf`.
  1/100 mismatches
  [3] Inf - 0 == Inf
  
  [ FAIL 5 | WARN 0 | SKIP 5 | PASS 303 ]
  Error: Test failures
  Execution halted