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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: as_flextable.crosstable
> ### Title: Turns a 'crosstable' object into a formatted 'flextable'
> ### Aliases: as_flextable.crosstable ctf cross_to_flextable to_flextable
> ###   as_flextable af
> ### Keywords: internal
> 
> ### ** Examples
> 
> #Crosstables
> library(crosstable)
> library(dplyr)

Attaching package: ‘dplyr’

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

    filter, lag

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

    intersect, setdiff, setequal, union

> crosstable_options(crosstable_fontsize_header=14,
+                    crosstable_fontsize_subheaders=10,
+                    crosstable_fontsize_body=8)
> crosstable(iris) %>% as_flextable()
a flextable object.
col_keys: `label`, `variable`, `value` 
header has 1 row(s) 
body has 19 row(s) 
original dataset sample: 
           .id        label   variable         value
1 Sepal.Length Sepal.Length  Min / Max     4.3 / 7.9
2 Sepal.Length Sepal.Length  Med [IQR] 5.8 [5.1;6.4]
3 Sepal.Length Sepal.Length Mean (std)     5.8 (0.8)
4 Sepal.Length Sepal.Length     N (NA)       150 (0)
5  Sepal.Width  Sepal.Width  Min / Max     2.0 / 4.4
> crosstable(mtcars2, -model, by=c(am, vs)) %>% as_flextable(header_show_n=1:2)
a flextable object.
col_keys: `label`, `variable`, `am=auto & vs=straight`, `am=manual & vs=straight`, `am=auto & vs=vshaped`, `am=manual & vs=vshaped` 
header has 2 row(s) 
body has 42 row(s) 
original dataset sample: 
  .id               label   variable am=auto & vs=straight
1 mpg   Miles/(US) gallon  Min / Max           17.8 / 24.4
2 mpg   Miles/(US) gallon  Med [IQR]      21.4 [18.6;22.1]
3 mpg   Miles/(US) gallon Mean (std)            20.7 (2.5)
4 mpg   Miles/(US) gallon     N (NA)                 7 (0)
5 cyl Number of cylinders          4            3 (27.27%)
  am=manual & vs=straight am=auto & vs=vshaped am=manual & vs=vshaped
1             21.4 / 33.9          10.4 / 19.2            15.0 / 26.0
2        30.4 [25.1;31.4]     15.2 [14.1;16.6]       20.4 [16.8;21.0]
3              28.4 (4.8)           15.1 (2.8)             19.8 (4.0)
4                   7 (0)               12 (0)                  6 (0)
5              7 (63.64%)               0 (0%)              1 (9.09%)
> crosstable(mtcars2, cols=c(mpg, cyl), by=am, effect=TRUE) %>%
+    as_flextable(keep_id=TRUE, autofit=FALSE)
a flextable object.
col_keys: `.id`, `label`, `variable`, `auto`, `manual`, `effect` 
header has 2 row(s) 
body has 7 row(s) 
original dataset sample: 
  .id               label   variable             auto           manual
1 mpg   Miles/(US) gallon  Min / Max      10.4 / 24.4      15.0 / 33.9
2 mpg   Miles/(US) gallon  Med [IQR] 17.3 [14.9;19.2] 22.8 [21.0;30.4]
3 mpg   Miles/(US) gallon Mean (std)       17.1 (3.8)       24.4 (6.2)
4 mpg   Miles/(US) gallon     N (NA)           19 (0)           13 (0)
5 cyl Number of cylinders          4       3 (27.27%)       8 (72.73%)
                                                                                                    effect
1                     Difference in means (t-test CI), ref='auto'\nmanual minus auto: 7.24 [3.64 to 10.85]
2                     Difference in means (t-test CI), ref='auto'\nmanual minus auto: 7.24 [3.64 to 10.85]
3                     Difference in means (t-test CI), ref='auto'\nmanual minus auto: 7.24 [3.64 to 10.85]
4                     Difference in means (t-test CI), ref='auto'\nmanual minus auto: 7.24 [3.64 to 10.85]
5 Odds ratio [95% Wald CI], ref='manual vs auto'\n6 vs 4: 0.28 [0.03 to 1.99]\n8 vs 4: 0.06 [0.01 to 0.39]
> crosstable(mtcars2, cols=c(mpg, cyl), by=am, effect=TRUE) %>%
+    as_flextable(compact=TRUE, header_show_n=TRUE)
Error in vectbl_assign(x[[j]], i, recycled_value[[j]]) : 
  DLL requires the use of native symbols
Calls: %>% ... tbl_subassign_row -> withCallingHandlers -> vectbl_assign
Execution halted