Given a tibble x of variables, some of which are wide form category counts, and the remainder of which are document variables (docvars in quanteda terminology), decompose the variables specified by the tidyselect arguments into a 'counts' variable in sparse format and keep the remainder.

jl_process_topics(x, ..., drop_old_vars = TRUE, drop_unused_vars = TRUE)

Arguments

x

a tibble

...

a tidy select expression

drop_old_vars

whther to remove the wide variables (default: TRUE)

drop_unused_vars

whether to drop wide variables whose column sums are zero

Value

a tibble with a 'counts' variable