rm_no_overlap {textTools} | R Documentation |
Delete rows in a text.table where the records within a group are not also found in other groups (overlapping records)
Description
Delete rows in a text.table where the records within a group are not also found in other groups (overlapping records)
Usage
rm_no_overlap(x, text, group_by = c())
Arguments
x |
A text.table created by as.text.table(). |
text |
A string, the name of the column in x to determine deletion of rows based on the lack of presence of overlapping records. |
group_by |
A vector of column names to group by. Doesn't work if the group by column is a list column. |
Value
A text.table, with rows not having records found in multiple groups (overlapping records) deleted.
Examples
rm_no_overlap(
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",
group_by = "col1"
)
[Package textTools version 0.1.0 Index]