Running ‘anova.R’
  Running ‘clm.fit.R’
  Running ‘clm.formula.R’
  Running ‘clmm.R’ [10s/29s]
  Running ‘clmm.control.R’
  Running ‘clmm.formula.R’
  Running ‘confint.R’ [5s/12s]
  Running ‘nominal.test.R’ [7s/17s]
  Running ‘test-all.R’ [28s/68s]
  Running ‘test.clm.Theta.R’
  Running ‘test.clm.convergence.R’
  Running ‘test.clm.flex.link.R’
  Running ‘test.clm.model.matrix.R’
  Running ‘test.clm.predict.R’
  Running ‘test.clm.profile.R’
  Running ‘test.clm.single.anova.R’
  Running ‘test.general.R’
  Running ‘test.makeThresholds.R’
  Running ‘test.sign.R’
  Running ‘test0weights.R’
  Running ‘testAnova.clm2.R’
  Running ‘testCLM.R’
Running the tests in ‘tests/clm.formula.R’ failed.
Complete output:
  > library(ordinal)
  > ## library(devtools)
  > ## r2path <- "/Users/rhbc/Documents/Rpackages/ordinal/pkg/ordinal"
  > ## clean_dll(pkg = r2path)
  > ## load_all(r2path)
  > 
  > #################################
  > ## Appropriate evaluation of formulas:
  > 
  > ## These fail and give appropriate error messages:
  > ##  fm1 <- clm(rating ~ contact, scale=temp, data=wine)
  > ##  fm1 <- clm(rating ~ contact, scale=~Temp, data=wine)
  > ##  fm1 <- clm(rating ~ contact, scale="temp", data=wine)
  > ##  sca <- "temp"
  > ##  fm1 <- clm(rating ~ contact, scale=sca, data=wine)
  > ##  sca <- as.formula(sca)
  > ##  sca <- as.formula(temp)
  > ##  sca <- with(wine, as.formula(temp))
  > 
  > ## These all work as intended with no warnings or errors:
  > fm1 <- clm(rating ~ contact, scale="~temp", data=wine)
  Error in forms[[i]][[2]] : subscript out of bounds
  Calls: clm ... get_clmFormulas -> do.call -> getFullForm -> Deparse -> deparse
  Execution halted
Running the tests in ‘tests/clmm.formula.R’ failed.
Complete output:
  > library(ordinal)
  > data(wine)
  > 
  > #################################
  > ## Appropriate evaluation of formulas:
  > 
  > ## These all work as intended with no warnings or errors:
  > fm1 <- clmm(rating ~ contact + (1|judge), data=wine)
  > fm1
  Cumulative Link Mixed Model fitted with the Laplace approximation
  
  formula: rating ~ contact + (1 | judge)
  data:    wine
  
   link  threshold nobs logLik AIC    niter    max.grad
   logit flexible  72   -98.80 209.59 228(686) 3.67e-06
  
  Random effects:
   Groups Name        Variance Std.Dev.
   judge  (Intercept) 0.4428   0.6654  
  Number of groups:  judge 9 
  
  Coefficients:
  contactyes 
         1.3 
  
  Thresholds:
       1|2      2|3      3|4      4|5 
  -2.28331  0.04325  1.86062  3.20298 
  > fm1 <- clmm("rating ~ contact + (1|judge)", data=wine)
  Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : 
    contrasts can be applied only to factors with 2 or more levels
  Calls: clmm ... model.matrix -> model.matrix.default -> contrasts<-
  In addition: Warning messages:
  1: In Ops.factor(1, judge) : '|' not meaningful for factors
  2: In Ops.factor(1, judge) : '|' not meaningful for factors
  Execution halted
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > 
  > if(require(testthat) && require(ordinal)) {
  +     test_check("ordinal")
  + }
  Loading required package: testthat
  Loading required package: ordinal
  ── 1. Failure: standard formulae are interpreted correctly/give right error mess
  `fm1 <- clm(rating ~ contact, scale = "temp", data = wine)` threw an error with unexpected message.
  Expected match: "unable to interpret 'formula', 'scale' or 'nominal'"
  Actual message: "subscript out of bounds"
  
  ── 2. Failure: standard formulae are interpreted correctly/give right error mess
  `fm1 <- clm(rating ~ contact, scale = sca, data = wine)` threw an error with unexpected message.
  Expected match: "unable to interpret 'formula', 'scale' or 'nominal'"
  Actual message: "subscript out of bounds"
  
  ── 3. Error: standard formulae are interpreted correctly/give right error messag
  subscript out of bounds
  1: clm(rating ~ contact, scale = "~temp", data = wine) at testthat/test-clm-formula.R:23
  2: get_clmFormulas(mc, call.envir)
  3: do.call("getFullForm", forms)
  4: getFullForm(rating ~ contact, scale = structure("~temp", .Environment = <environment>))
  5: Deparse(forms[[i]][[2]])
  6: deparse(expr = expr, width.cutoff = width.cutoff, backtick = backtick, control = control, 
         nlines = nlines)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 70 SKIPPED: 0 FAILED: 3
  1. Failure: standard formulae are interpreted correctly/give right error messages (@test-clm-formula.R#11) 
  2. Failure: standard formulae are interpreted correctly/give right error messages (@test-clm-formula.R#15) 
  3. Error: standard formulae are interpreted correctly/give right error messages (@test-clm-formula.R#23) 
  
  Error: testthat unit tests failed
  Execution halted