On Mon, 21 Jan 2013, mtb...@gmail.com wrote:
I am trying to search for string that includes the caret symbol, using the following code: grepl("latitude^2",temp)
Many regex implementations require us to escape a metacharacter such as '^' by preceeding it with a backslash. This indicates the next character is a literal and not, in this case, the beginning of the line. Try \^ in your statement. Rich ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.