Running examples in ‘broom-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: augment.poLCA
> ### Title: Augment data with information from a(n) poLCA object
> ### Aliases: augment.poLCA
> 
> ### ** Examples
> 
> ## Don't show: 
> if (rlang::is_installed("poLCA")) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf
+ ## End(Don't show)
+ 
+ # load libraries for models and data
+ library(poLCA)
+ library(dplyr)
+ 
+ # generate data
+ data(values)
+ 
+ f <- cbind(A, B, C, D) ~ 1
+ 
+ # fit model
+ M1 <- poLCA(f, values, nclass = 2, verbose = FALSE)
+ 
+ M1
+ 
+ # summarize model fit with tidiers + visualization
+ tidy(M1)
+ augment(M1)
+ glance(M1)
+ 
+ library(ggplot2)
+ 
+ ggplot(tidy(M1), aes(factor(class), estimate, fill = factor(outcome))) +
+   geom_bar(stat = "identity", width = 1) +
+   facet_wrap(~variable)
+   
+ # three-class model with a single covariate.
+ data(election)
+ 
+ f2a <- cbind(
+   MORALG, CARESG, KNOWG, LEADG, DISHONG, INTELG,
+   MORALB, CARESB, KNOWB, LEADB, DISHONB, INTELB
+ ) ~ PARTY
+ 
+ nes2a <- poLCA(f2a, election, nclass = 3, nrep = 5, verbose = FALSE)
+ 
+ td <- tidy(nes2a)
+ td
+ 
+ ggplot(td, aes(outcome, estimate, color = factor(class), group = class)) +
+   geom_line() +
+   facet_wrap(~variable, nrow = 2) +
+   theme(axis.text.x = element_text(angle = 90, hjust = 1))
+ 
+ au <- augment(nes2a)
+ 
+ au
+ 
+ count(au, .class)
+ 
+ # if the original data is provided, it leads to NAs in new columns
+ # for rows that weren't predicted
+ au2 <- augment(nes2a, data = election)
+ 
+ au2
+ 
+ dim(au2)
+ ## Don't show: 
+ }) # examplesIf
> library(poLCA)
Loading required package: scatterplot3d
Loading required package: MASS
> library(dplyr)

Attaching package: ‘dplyr’

The following object is masked from ‘package:MASS’:

    select

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> data(values)
> f <- cbind(A, B, C, D) ~ 1
> M1 <- poLCA(f, values, nclass = 2, verbose = FALSE)
> M1
Conditional item response (column) probabilities,
 by outcome variable, for each class (row) 
 
$A
           Pr(1)  Pr(2)
class 1:  0.2864 0.7136
class 2:  0.0068 0.9932

$B
           Pr(1)  Pr(2)
class 1:  0.6704 0.3296
class 2:  0.0602 0.9398

$C
           Pr(1)  Pr(2)
class 1:  0.6460 0.3540
class 2:  0.0735 0.9265

$D
           Pr(1)  Pr(2)
class 1:  0.8676 0.1324
class 2:  0.2309 0.7691

Estimated class population shares 
 0.7208 0.2792 
 
Predicted class memberships (by modal posterior prob.) 
 0.6713 0.3287 
 
========================================================= 
Fit for 2 latent classes: 
========================================================= 
number of observations: 216 
number of estimated parameters: 9 
residual degrees of freedom: 6 
maximum log-likelihood: -504.4677 
 
AIC(2): 1026.935
BIC(2): 1057.313
G^2(2): 2.719922 (Likelihood ratio/deviance statistic) 
X^2(2): 2.719764 (Chi-square goodness of fit) 
 
> tidy(M1)
Error in nchar(xs) : 
  number of characters is not computable in "bytes" encoding, element 1
Calls: <Anonymous> ... <Anonymous> -> .Call -> <Anonymous> -> type.convert.default
Execution halted