diff --git a/DESCRIPTION b/DESCRIPTION index 5e70fcb..02f7690 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -4,10 +4,9 @@ Version: 0.1.0 Authors@R: c( person("Tyler", "Littlefield", email = "tylurp1@gmail.com", role = c("aut", "cre"), comment=c(ORCID="0000-0002-6020-1125")), person("Dmytro", "Perepolkin", email = "dperepolkin@gmail.com", role = c("ctb"), comment=c(ORCID="0000-0001-8558-6183"))) -Description: The goal of RVerbalExpressions is to make it easier to build regular - expressions using grammar and functionality inspired by - . Usage of the - `%>%` is encouraged to build expressions in a chain-like fashion. +Description: Build regular expressions using grammar and functionality inspired + by . Usage of the %>% is encouraged to + build expressions in a chain-like fashion. License: MIT + file LICENSE Encoding: UTF-8 LazyData: true diff --git a/NEWS.md b/NEWS.md index cb10fbd..8412609 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,4 @@ -# RVerbalExpressions 0.0.0.9000 +# RVerbalExpressions 0.1.0 +* Released version 0.1.0 on CRAN. * Added a `NEWS.md` file to track changes to the package. diff --git a/R/lookarounds.R b/R/lookarounds.R index e0f4779..dd0f709 100644 --- a/R/lookarounds.R +++ b/R/lookarounds.R @@ -8,10 +8,15 @@ #' #' @examples #' # matches any number of digits, but not preceded by "USD" -#' rx() %>% rx_avoid_prefix('USD') %>% rx_digit() %>% rx_one_or_more() +#' rx() %>% +#' rx_avoid_prefix('USD') %>% +#' rx_digit() %>% +#' rx_one_or_more() #' #' #matches a digit, but not followed by " dollars" -#' rx() %>% rx_digit() %>% rx_avoid_suffix(' dollars') +#' rx() %>% +#' rx_digit() %>% +#' rx_avoid_suffix(' dollars') #' #' @rdname rx_avoid #' @export diff --git a/R/loops.R b/R/loops.R index ade1e37..f646b53 100644 --- a/R/loops.R +++ b/R/loops.R @@ -10,7 +10,8 @@ #' rx_one_or_more() #' #' # create an expression -#' x <- rx_find(value = "a") %>% +#' x <- rx() %>% +#' rx_find("a") %>% #' rx_one_or_more() #' #' # create input @@ -40,7 +41,8 @@ rx_one_or_more <- function(.data = NULL, mode = "greedy") { #' rx_none_or_more() #' #' # create an expression -#' x <- rx_find(value = "a") %>% +#' x <- rx() %>% +#' rx_find("a") %>% #' rx_none_or_more() #' #' # create input diff --git a/R/modifiers.R b/R/modifiers.R index e1fd5ee..d37f141 100644 --- a/R/modifiers.R +++ b/R/modifiers.R @@ -9,11 +9,13 @@ #' rx_with_any_case() #' #' # case insensitive -#' x <- rx_find(value = "abc") %>% +#' x <- rx() %>% +#' rx_find("abc") %>% #' rx_with_any_case() #' #' # case sensitive -#' y <- rx_find(value = "abc") %>% +#' y <- rx() %>% +#' rx_find("abc") %>% #' rx_with_any_case(enable = FALSE) #' #' grepl(x, "ABC") # should be true diff --git a/R/rules.R b/R/rules.R index c927452..f439154 100644 --- a/R/rules.R +++ b/R/rules.R @@ -11,7 +11,8 @@ #' rx_start_of_line(enable = FALSE) #' #' # create expression -#' x <- rx_start_of_line() %>% +#' x <- rx() %>% +#' rx_start_of_line() %>% #' rx_find("apple") #' #' grepl(x, "pineapple") # should be false @@ -43,7 +44,8 @@ rx_start_of_line <- function(.data = NULL, enable = TRUE) { #' rx_end_of_line("abc", enable = TRUE) #' #' # create expression -#' x <- rx_start_of_line(FALSE) %>% +#' x <- rx() %>% +#' rx_start_of_line(FALSE) %>% #' rx_find("apple") %>% #' rx_end_of_line() #' @@ -99,7 +101,8 @@ rx_find <- function(.data = NULL, value) { #' rx_maybe(value = "abc") #' #' # create expression -#' x <- rx_start_of_line() %>% +#' x <- rx() %>% +#' rx_start_of_line() %>% #' rx_maybe("abc") %>% #' rx_end_of_line(enable = FALSE) #' @@ -153,7 +156,8 @@ rx_either_of <- function(.data, ...) { #' rx_anything() #' rx_anything(mode = "lazy") #' -#' x <- rx_start_of_line() %>% +#' x <- rx() %>% +#' rx_start_of_line() %>% #' rx_anything() %>% #' rx_end_of_line() #' @@ -332,7 +336,8 @@ rx_any_of <- function(.data = NULL, value) { #' rx_not(value = "FEB-28") #' #' # construct expression -#' x <- rx_start_of_line() %>% +#' x <- rx() %>% +#' rx_start_of_line() %>% #' rx_find('FEB-29') %>% #' rx_not("FEB-28") #' @@ -343,7 +348,8 @@ rx_any_of <- function(.data = NULL, value) { #' regmatches(string, regexpr(x, string, perl = TRUE)) #' #' # another example -#' rx_find(value = "q") %>% +#' rx() %>% +#' rx_find("q") %>% #' rx_not("u") %>% #' grepl(x = c("qu", "qa", "qq", "q", "q u"), perl = TRUE) #' @@ -392,7 +398,8 @@ rx_range <- function(.data = NULL, value) { #' @examples #' rx_word_edge() #' -#'x <- rx_word_edge() %>% +#'x <- rx() %>% +#' rx_word_edge() %>% #' rx_alpha() %>% #' rx_one_or_more() %>% #' rx_word_edge() diff --git a/R/utils.R b/R/utils.R index db28617..27f3398 100644 --- a/R/utils.R +++ b/R/utils.R @@ -25,7 +25,6 @@ NULL #' sanitize("^") #' sanitize("^+") #' sanitize("^+?") -#' #export - nade not exported #' #' @export sanitize <- function(x) { diff --git a/cran-comments.md b/cran-comments.md index ae83a23..7a61e4b 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,10 @@ +## Resubmission +This is a resubmission. In this version I have: + +* Removed the beginning text of the the Description in the DESCRIPTION file. Per the docs "It is good practice not to start with the package name, ‘This package’ or similar." + +* Removed backticks from %>%. + ## Test environments * local OS X install, R 3.6.0 * ubuntu 14.04 (on travis-ci), R 3.6.0 diff --git a/docs/index.html b/docs/index.html index d7e8c14..dce3654 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,10 +17,9 @@ - +