issues
search
b-rodrigues
/
brotools
21
stars
8
forks
source link
describe() throws error when the df %>% select() returns 0
#7
Open
amysheep
opened
5 years ago
amysheep
commented
5 years ago
eg the describe_list function
`
df %>%
select_if(is.list) %>%
tidyr::gather(variable, value) %>%
group_by(variable) %>%
summarise_all(funs(n_missing = sum(is.na(unique(unlist(value)))),
nobs = length(unlist(value)),
n_unique = length(unique(unlist(value))))) %>%
mutate(type = "List")
Error: Column
variable
is unknown
df %>%
select_if(is.list) %>%
tidyr::gather(variable, value)
data frame with 0 columns and 9474 rows
```
eg the describe_list function
`
df %>%variable
is unknown