[R] grep help (character ommission)

Johannes Graumann johannes_graumann at web.de
Wed May 1 10:37:58 CEST 2013


Hello,

Banging my head against a wall here ... can anyone light the way to a 
pattern modification that would make the following TRUE?

identical(
  grep(
    "^Intensity\\s[^HL]",
    c("Intensity","Intensity L", "Intensity H", "Intensity Rep1")),
  as.integer(c(1,4)))

Thank you for your time.

Sincerely, Joh



More information about the R-help mailing list