Running examples in 'tableone-Ex.R' failed
The error most likely occurred in:

> ### Name: CreateTableOne
> ### Title: Create an object summarizing both continuous and categorical
> ###   variables
> ### Aliases: CreateTableOne
> 
> ### ** Examples
> 
> 
> ## Load
> library(tableone)
> 
> ## Load Mayo Clinic Primary Biliary Cirrhosis Data
> library(survival)
> data(pbc)
> ## Check variables
> head(pbc)
  id time status trt      age sex ascites hepato spiders edema bili chol
1  1  400      2   1 58.76523   f       1      1       1   1.0 14.5  261
2  2 4500      0   1 56.44627   f       0      1       1   0.0  1.1  302
3  3 1012      2   1 70.07255   m       0      0       0   0.5  1.4  176
4  4 1925      2   1 54.74059   f       0      1       1   0.5  1.8  244
5  5 1504      1   2 38.10541   f       0      1       1   0.0  3.4  279
6  6 2503      2   2 66.25873   f       0      1       0   0.0  0.8  248
  albumin copper alk.phos    ast trig platelet protime stage
1    2.60    156   1718.0 137.95  172      190    12.2     4
2    4.14     54   7394.8 113.52   88      221    10.6     3
3    3.48    210    516.0  96.10   55      151    12.0     4
4    2.54     64   6121.8  60.63   92      183    10.3     4
5    3.53    143    671.0 113.15   72      136    10.9     3
6    3.98     50    944.0  93.00   63       NA    11.0     3
> 
> ## Make categorical variables factors
> varsToFactor <- c("status","trt","ascites","hepato","spiders","edema","stage")
> pbc[varsToFactor] <- lapply(pbc[varsToFactor], factor)
> 
> ## Create a variable list
> dput(names(pbc))
c("id", "time", "status", "trt", "age", "sex", "ascites", "hepato", 
"spiders", "edema", "bili", "chol", "albumin", "copper", "alk.phos", 
"ast", "trig", "platelet", "protime", "stage")
> vars <- c("time","status","age","sex","ascites","hepato",
+           "spiders","edema","bili","chol","albumin",
+           "copper","alk.phos","ast","trig","platelet",
+           "protime","stage")
> 
> ## Create Table 1 stratified by trt
> tableOne <- CreateTableOne(vars = vars, strata = c("trt"), data = pbc)
Error in library.dynam(lib, package, package.lib) : 
  DLL 'dplyr' not found: maybe not installed for this architecture?
Calls: CreateTableOne ... namespaceImportFrom -> asNamespace -> loadNamespace -> library.dynam
Execution halted