Test if characters are in a string

I’m trying to determine if a string is a subset of another string. For example: chars <- “test” value <- “es” I want to return TRUE if “value” appears as part of the string “chars”. In the following scenario, I would want to return false: chars <- “test” value <- “et” 9 Answers 9

How can I trim leading and trailing white space?

I am having some trouble with leading and trailing white space in a data.frame. For example, I look at a specific row in a data.frame based on a certain condition: > myDummy[myDummy$country == c(“Austria”),c(1,2,3:7,19)] [1] codeHelper country dummyLI dummyLMI dummyUMI [6] dummyHInonOECD dummyHIOECD dummyOECD <0 rows> (or 0-length row.names) I was wondering why I didn’t … Read more