search for: getparsetext

Displaying 5 results from an estimated 5 matches for "getparsetext".

2025 Jan 23
1
Depends: R (>= 4.1) for packages that use |> and \(...)
...then look at the top-level function in the call, but that feels quite fragile: x <- utils::getParseData(parse(f, keep.source = TRUE)) i <- x$token %in% "PLACEHOLDER" pi <- x[i, "parent"] ppi <- x[x$id %in% pi, "parent"] placeholder_expressions <- utils::getParseText(x, ppi) extractor_used <- vapply(placeholder_expressions, function(src) { toplevel <- parse(text = paste("PLACEHOLDER |> ", src))[[1]][[1]] identical(toplevel, quote(`$`)) || identical(toplevel, quote(`[`)) || identical(toplevel, quote(`[[`)) }, FALSE) Alternatively, we ma...
2025 Jan 23
2
Depends: R (>= 4.1) for packages that use |> and \(...)
...ction in the > call, but that feels quite fragile: > x <- utils::getParseData(parse(f, keep.source = TRUE)) > i <- x$token %in% "PLACEHOLDER" > pi <- x[i, "parent"] > ppi <- x[x$id %in% pi, "parent"] > placeholder_expressions <- utils::getParseText(x, ppi) > extractor_used <- vapply(placeholder_expressions, function(src) { > toplevel <- parse(text = paste("PLACEHOLDER |> ", src))[[1]][[1]] > identical(toplevel, quote(`$`)) || > identical(toplevel, quote(`[`)) || > identical(toplevel, quote(`[[`)) > }...
2025 Jan 22
1
Depends: R (>= 4.1) for packages that use |> and \(...)
Hello all, Would packages using the underscore placeholder with the native pipe need to also depend on R >= 4.2.0? There appear to be a number, modifying Ivan's GitHub search: https://github.com/search?q=org%3Acran+path%3A%2F%5B.%5D%5BRr%5Dd%3F%24%2F+%2F%5Cs%5C%7C%3E%5Cs.*%3D%5Cs%3F_%2F&type=code Regards, Ian ____ Ian Farm Laboratory Manager, The Agroecology Lab University of Maine
2013 Apr 03
0
R 3.0.0 is released
...(and no longer attempts to plot interaction terms). o The parser now incorporates code from Romain Francois' parser package, to support more detailed computation on the code, such as syntax highlighting, comment-based documentation, etc. Functions getParseData() and getParseText() access the data. o There is a new function rep_len() analogous to rep.int() for when speed is required (and names are not). o The undocumented use rep(NULL, length.out = n) for n > 0 (which returns NULL) now gives a warning. o demo() gains an encoding argument for th...
2013 Apr 03
0
R 3.0.0 is released
...(and no longer attempts to plot interaction terms). o The parser now incorporates code from Romain Francois' parser package, to support more detailed computation on the code, such as syntax highlighting, comment-based documentation, etc. Functions getParseData() and getParseText() access the data. o There is a new function rep_len() analogous to rep.int() for when speed is required (and names are not). o The undocumented use rep(NULL, length.out = n) for n > 0 (which returns NULL) now gives a warning. o demo() gains an encoding argument for th...