Updated dfm_gen to have all topic vectors as numeric variables

master
Erik de Vries 6 years ago
parent 20d7510a89
commit 3e66c7e1cd

@ -37,10 +37,10 @@ dfm_gen <- function(out,words = '999', text = "lemmas") {
}
if ('_source.codes.majorTopic' %in% colnames(out)) {
out <- out %>%
mutate(codes = case_when(
mutate(codes = as.numeric(case_when(
.$`_source.codes.timeSpent` == -1 ~ NA_character_,
TRUE ~ .$`_source.codes.majorTopic`
)
))
) %>%
mutate(junk = case_when(
.$codes == 2301 ~ 1,

Loading…
Cancel
Save