Extracting dates following a specific word from a column of strings using dplyr
问题 I am trying to extract the most recent date that a report was added in an R dataframe of reports. The text always looks like Date Ordered: M/DD/YYYY and may contain 0 many times in a given report. If it's repeating, I want the most recent (usually the last) instance, and I'm trying to convert it to a date in a mutated dplyr column. Using the code below on my actual dataframe, I get the error: Error in if (nchar(s) > 0 && substring(s, 1, 1) == "\002") { : missing value where TRUE/FALSE needed