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

> ### Name: compare_diag
> ### Title: Diagnosis of train set and test set of split_df object
> ### Aliases: compare_diag
> 
> ### ** Examples
> 
> library(dplyr)

Attaching package: ‘dplyr’

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

    combine

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

    filter, lag

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

    intersect, setdiff, setequal, union

> 
> # Credit Card Default Data
> head(ISLR::Default)
  default student   balance    income
1      No      No  729.5265 44361.625
2      No     Yes  817.1804 12106.135
3      No      No 1073.5492 31767.139
4      No      No  529.2506 35704.494
5      No      No  785.6559 38463.496
6      No     Yes  919.5885  7491.559
> 
> defaults <- ISLR::Default
> defaults$id <- seq(NROW(defaults))
> 
> set.seed(1)
> defaults[sample(seq(NROW(defaults)), 3), "student"] <- NA
> set.seed(2)
> defaults[sample(seq(NROW(defaults)), 10), "balance"] <- NA
> 
> sb <- defaults %>%
+   split_by(default)
> 
> sb %>%
+   compare_diag()
* Detected diagnose missing value
 - student
 - balance
 - balance

* Detected diagnose missing levels
 - student
$missing_value
# A tibble: 3 x 4
  variables train_misscount train_missrate test_missrate
  <chr>               <int>          <dbl>         <dbl>
1 student                 3         0.0429       NA     
2 balance                 8         0.114        NA     
3 balance                 2        NA             0.0667

$single_value
# A tibble: 0 x 3
# … with 3 variables: variables <chr>, train_uniq <lgl>, test_uniq <lgl>

$uniq_rate
# A tibble: 0 x 5
# … with 5 variables: variables <chr>, train_uniqcount <int>,
#   train_uniqrate <dbl>, test_uniqcount <int>, test_uniqrate <dbl>

$missing_level
# A tibble: 1 x 4
  variables n_levels train_missing_nlevel test_missing_nlevel
  <chr>        <int>                <int>               <int>
1 student          3                    0                   1

> 
> sb %>%
+   compare_diag(add_character = TRUE)
Error in regroup(attr(out, "groups"), environment()) : 
  LENGTH or similar applied to NULL object
Calls: %>% ... freduce -> <Anonymous> -> filter -> filter.tbl_df -> regroup
Execution halted