# NOT RUN {
rm_infrequent_words(
as.text.table(
x = as.data.table(
list(
col1 = c(
"a",
"b"
),
col2 = c(
tolower("The dog is nice because it picked up the newspaper."),
tolower("The dog is extremely nice because it does the dishes.")
)
)
),
text = "col2",
split = " "
),
text = "col2",
count_col_name = "count",
min_count = 4
)
rm_infrequent_words(
as.text.table(
x = as.data.table(
list(
col1 = c(
"a",
"b"
),
col2 = c(
tolower("The dog is nice because it picked up the
newspaper and it is the nice kind of dog."),
tolower("The dog is extremely nice because it does the dishes
and it is cool.")
)
)
),
text = "col2",
split = " "
),
text = "col2",
count_col_name = "count",
group_by = "col1",
min_count = 2
)
# }
Run the code above in your browser using DataLab