Skip to content

Commit

Permalink
family given names ex
Browse files Browse the repository at this point in the history
  • Loading branch information
tdhock committed Aug 16, 2024
1 parent 0bbcd3b commit 9755007
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Authors@R: c(
person("Toby", "Hocking",
email="[email protected]",
role=c("aut", "cre")))
Version: 2024.7.16
Version: 2024.8.15
License: GPL-3
Title: Named Capture to Data Tables
Description: User-friendly functions for extracting a data
Expand Down
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Changes in version 2024.8.15

- arrow::arrow_with_dataset() to avoid CRAN NOTE.

Changes in version 2024.7.16

- arrow::arrow_with_dataset() to avoid CRAN NOTE.
Expand Down
11 changes: 11 additions & 0 deletions R/alternatives.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ alternatives_with_shared_groups <- structure(function
### list).
}, ex=function(){

## Example 0: matching family and given names.
nc::capture_first_vec(
c("Toby Dylan Hocking","Hocking, Toby Dylan"),
nc::alternatives_with_shared_groups(
family="[A-Z][a-z]+",
given="[^,]+",
list(given, " ", family),
list(family, ", ", given)
)
)

## Example 1: matching dates in different formats, but always same
## type in each alternative.
subject.vec <- c("mar 17, 1983", "26 sep 2017", "17 mar 1984")
Expand Down
11 changes: 11 additions & 0 deletions man/alternatives_with_shared_groups.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ list).}

\examples{

## Example 0: matching family and given names.
nc::capture_first_vec(
c("Toby Dylan Hocking","Hocking, Toby Dylan"),
nc::alternatives_with_shared_groups(
family="[A-Z][a-z]+",
given="[^,]+",
list(given, " ", family),
list(family, ", ", given)
)
)

## Example 1: matching dates in different formats, but always same
## type in each alternative.
subject.vec <- c("mar 17, 1983", "26 sep 2017", "17 mar 1984")
Expand Down

0 comments on commit 9755007

Please sign in to comment.