search for: emptymatch

Displaying 4 results from an estimated 4 matches for "emptymatch".

Did you mean: emp_ematch
2019 Aug 15
2
Feature request: non-dropping regmatches/strextract
...ehavior. Although this can be implemented in a user-defined function, retaining empty matches facilitates programmatic use, and seems to be something that should be available in base R. It is available, for example, in MATLAB, a comparable array language. Alternatively, perhaps a nomatch (or maybe emptymatch) argument in the spirit of `[.data.table`? That is, an argument nomatch where nomatch = NULL (the default) results in drops for vector outputs and character(0) for list outputs and nomatch = NA results in insertion of NA_character_, and nomatch = '' results in insertion of empty string. I...
2019 Aug 15
0
Feature request: non-dropping regmatches/strextract
...> implemented in a user-defined function, retaining empty matches facilitates > programmatic use, and seems to be something that should be available in > base R. It is available, for example, in MATLAB, a comparable array > language. > > Alternatively, perhaps a nomatch (or maybe emptymatch) argument in the > spirit of `[.data.table`? That is, an argument nomatch where nomatch = NULL > (the default) results in drops for vector outputs and character(0) for list > outputs and nomatch = NA results in insertion of NA_character_, and nomatch > = '' results in insertion...
2019 Aug 15
1
Feature request: non-dropping regmatches/strextract
...a user-defined function, retaining empty matches facilitates >> programmatic use, and seems to be something that should be available in >> base R. It is available, for example, in MATLAB, a comparable array >> language. >> >> Alternatively, perhaps a nomatch (or maybe emptymatch) argument in the >> spirit of `[.data.table`? That is, an argument nomatch where nomatch = NULL >> (the default) results in drops for vector outputs and character(0) for list >> outputs and nomatch = NA results in insertion of NA_character_, and nomatch >> = '' resul...
2019 Aug 15
4
Feature request: non-dropping regmatches/strextract
A very common use case for regmatches is to extract regex matches into a new column in a data.frame (or data.table, etc.) or otherwise use the extracted strings alongside the input. However, the default behavior is to drop empty matches, which results in mismatches in column length if reassignment is done without subsetting. For consistency with other R functions and compatibility with this use