Context: Trying to filter data frame to only include columns for "lemma" below.
method_matches <- matches %>% filter(lemma==c("analysis", "analyze", "assess", "assessment", "assign", "author", "autobiographical", "background", "base", "baseline", "cross", "construct", "construction", "correlation", "design", "development", "diagnose", "diagnosis", "diagnostic", "discuss", "discussion", "document", "documentation", "factor", "item", "measure", "measurement", "model", "modelling", "n", "personality", "result", "sample", "scale", "score", "structure", "student", "study", "use", "valid", "validate", "validity", "question", "questionnaire"))
Problem: R doesn't seem to like this as it comes up with the below error AND it is struggling to find all of the rows in the data frame. The data frame it returns is too small. Guessing it requires some functions that deal with text data but don't have much experience in this so any pointers would be helpful
ERROR: "longer object length is not a multiple of shorter object length"
Example dataset:
col_name <- c(id, year, epoch, lemma, repeat)
col_value <- c(3, 1998, 5, "abandon", 1)