Created
May 15, 2020 01:59
-
-
Save arbelt/03cf79b32feb6774718576ea4e111dd0 to your computer and use it in GitHub Desktop.
Example with textreg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(textreg) | |
library(tm) | |
library(dplyr) | |
library(wrapr) # for dot-pipe | |
df_mi <- df0 %.>% | |
filter(., !is.na(mostimportant)) | |
corp_mi <- df_mi %.>% | |
pull(., mostimportant) %.>% | |
VectorSource %.>% | |
VCorpus | |
corp_mi.clean <- clean.text(corp_mi) | |
corp_mi.stemmed <- stem.corpus(corp_mi.clean, verbose = FALSE) | |
textreg(corp_mi.stemmed, df_mi$experience %in% 5, verbosity = 0, C=1, gap = 1, min.pattern = 2, min.support = 4, | |
step.verbosity = 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment