Running ‘testthat.R’ [8s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > test_check("RcmdrPlugin.lfstat")
  Loading required package: RcmdrPlugin.lfstat
  Loading required package: lfstat
  Loading required package: xts
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: lmom
  Loading required package: lattice
  ── 1. Error: 2.6 Flow indices (@test-wmo-guidelines.r#64)  ─────────────────────
  replacement has 2 rows, data has 1
  1: recession(lfobj = ngaruroro, method = "MRC", seglength = 7, threshold = 70, peaklevel = 0.95, 
         thresbreaks = "fixed", plotMRC = FALSE) at testthat/test-wmo-guidelines.r:64
  2: MRC(lfobj, threshold = threshold, seglength = seglength, rainpeaklevel = rainpeaklevel, 
         thresbreaks = thresbreaks, thresbreakdays = thresbreakdays, plot = plotMRC, na.rm = na.rm)
  3: segselect(lfobj, threshold = threshold, seglength = seglength, thresbreaks = thresbreaks, 
         thresbreakdays = thresbreakdays, p = rainpeaklevel, na.rm = na.rm, season = season)
  4: `[<-`(`*tmp*`, ii, , value = c(8.479, 7.848, 7.286, 6.954, 6.701, 6.355, 6.067))
  5: `[<-.data.frame`(`*tmp*`, ii, , value = c(8.479, 7.848, 7.286, 6.954, 6.701, 6.355, 
     6.067))
  6: xpdrows.data.frame(x, rows, new.rows)
  7: `[[<-`(`*tmp*`, i, value = c(8.479, NA))
  8: `[[<-.data.frame`(`*tmp*`, i, value = c(8.479, NA))
  9: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ── 2. Error: 3 Case study (@test-wmo-guidelines.r#181)  ────────────────────────
  replacement has 2 rows, data has 1
  1: seasratio(lfobj = ngaruroro, breakdays = c("01/06", "01/10"), Q = 95) at testthat/test-wmo-guidelines.r:181
  2: buildthres(lfobj = lfobj, threslevel = Q, thresbreaks = "seasonal", breakdays = breakdays)
  3: `[<-`(`*tmp*`, ii, , value = c(1, 10))
  4: `[<-.data.frame`(`*tmp*`, ii, , value = c(1, 10))
  5: xpdrows.data.frame(x, rows, new.rows)
  6: `[[<-`(`*tmp*`, i, value = c(1, NA))
  7: `[[<-.data.frame`(`*tmp*`, i, value = c(1, NA))
  8: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 29 SKIPPED: 0 FAILED: 2
  1. Error: 2.6 Flow indices (@test-wmo-guidelines.r#64) 
  2. Error: 3 Case study (@test-wmo-guidelines.r#181) 
  
  Error: testthat unit tests failed
  Execution halted