dcomtois / summarytools

R Package to Quickly and Neatly Summarize Data
522 stars 78 forks source link

dfSummary() fails if list columns are present #92

Closed GegznaV closed 5 years ago

GegznaV commented 5 years ago

If list columns are present, dfSummary() fails.

data(starwars, package = "dplyr")
dfSummary(starwars)

Error in table(column_data, useNA = "no") : all arguments must have the same length

Add support for list columns of at least ignore them with an appropriate warning.

GegznaV commented 5 years ago
sapply(starwars, class) %>% tibble::enframe()
 # A tibble: 13 x 2
   name       value    
   <chr>      <chr>    
 1 name       character
 2 height     integer  
 3 mass       numeric  
 4 hair_color character
 5 skin_color character
 6 eye_color  character
 7 birth_year numeric  
 8 gender     character
 9 homeworld  character
10 species    character
11 films      list     
12 vehicles   list     
13 starships  list