Skip to content
Prev 22859 / 63424 Next

invert argument in grep

Duncan Murdoch wrote:
Hi,

Yes, good point. I agree with you that the value = "logical" is probably 
worth having to take advantage of these logical operators.

.... but, what about all these functions calling grep and passing 
arguments through the ellipsis. With this invert argument, we could do :

R> history(pattern = "grid\\..*\\(", invert = TRUE)

BTW, why not use ... in ls ? in case someone would like to use perl 
regex to use ls, or to get back at this thread, issue commands like :

R> ls("package:grid", pattern = "^grid\\.|Grob$", invert = TRUE)
 [1] "absolute.size"       "applyEdit"           "applyEdits"
 [4] "arcCurvature"        "arrow"               "childNames"
 [7] "convertHeight"       "convertNative"       "convertUnit"
[10] "convertWidth"        "convertX"            "convertY"
[13] "current.transform"   "current.viewport"    "current.vpPath"
[16] "current.vpTree"      "dataViewport"        "downViewport"
[19] "draw.details"        "drawDetails"         "editDetails"
[22] "engine.display.list" "gEdit"               "gEditList"
[25] "get.gpar"            "getNames"            "gList"
[28] "gpar"                "gPath"               "grob"
[31] "grobHeight"          "grobName"            "grobWidth"
[34] "grobX"               "grobY"               "gTree"
[37] "heightDetails"       "is.unit"             "layout.heights"
[40] "layoutRegion"        "layout.torture"      "layout.widths"
[43] "plotViewport"        "pop.viewport"        "popViewport"
[46] "postDrawDetails"     "preDrawDetails"      "push.viewport"
[49] "pushViewport"        "seekViewport"        "setChildren"
[52] "stringHeight"        "stringWidth"         "unit"
[55] "unit.c"              "unit.length"         "unit.pmax"
[58] "unit.pmin"           "unit.rep"            "upViewport"
[61] "validDetails"        "viewport"            "viewport.layout"
[64] "viewport.transform"  "vpList"              "vpPath"
[67] "vpStack"             "vpTree"              "widthDetails"
[70] "xDetails"            "yDetails"

Then, what about ... in apropos ?

Regards,

Romain