diff --git a/R/unglue.R b/R/unglue.R index 1cf0efd..69df226 100644 --- a/R/unglue.R +++ b/R/unglue.R @@ -1,6 +1,6 @@ #' Detect if strings are matched by a set of unglue patterns #' -#' Returns a logical indicating wether input strings were matched by one or more patterns +#' Returns a logical indicating whether input strings were matched by one or more patterns #' @inheritParams unglue #' @return a vector of logical. #' @export @@ -27,7 +27,7 @@ unglue_detect <- function( #' * `unglue_data()` to return a data frame from a character vector, #' just as `glue::glue_data()` does in reverse #' * `unglue()` to return a list of data frames containing the matches -#' * `unglue_vec()` to extract one value by element of `x`, chosen by indice or by +#' * `unglue_vec()` to extract one value by element of `x`, chosen by index or by #' name. #' * `unglue_unnest()` to extract value from a column of a data frame to new columns #' @@ -63,7 +63,7 @@ unglue_detect <- function( #' the conflicting values as separate arguments. Formula notation #' is supported if the package `rlang` is installed. #' @param col column containing the character vector to extract values from. -#' @param remove wether to remove the column `col` once extraction is performed +#' @param remove whether to remove the column `col` once extraction is performed #' @param var for `unglue_vec()`, the numeric index or the name of the subpattern to extract from #' @param na string to use when there is no match #' @return For `unglue()`a list of one row data frames, for `unglue_data` a diff --git a/R/unglue_regex.R b/R/unglue_regex.R index f06252c..e30f708 100644 --- a/R/unglue_regex.R +++ b/R/unglue_regex.R @@ -5,11 +5,11 @@ #' be used with functions from other packages). #' #' @inheritParams unglue -#' @param use_multiple wether we should consider that duplicate labels can match +#' @param use_multiple whether we should consider that duplicate labels can match #' different substrings. -#' @param named_capture wether to incorporate the names of the groups in the -#' ouput regex -#' @param attributes wether to give group attributes to the output +#' @param named_capture whether to incorporate the names of the groups in the +#' output regex +#' @param attributes whether to give group attributes to the output #' #' @export #' @return a character vector. diff --git a/README.Rmd b/README.Rmd index 28e9b01..2c65b5c 100644 --- a/README.Rmd +++ b/README.Rmd @@ -92,7 +92,7 @@ as `readr::type_convert`, or to a formula is *rlang* is installed. ### `unglue_unnest()` `unglue_unnest()` is named as a tribute to `tidyr::unnest()` as it's equivalent -to using sucessively `unglue()` and `unnest()` on a data frame column. It is +to using successively `unglue()` and `unnest()` on a data frame column. It is similar to `tidyr::extract()` in its syntax and efforts were made to make it as consistent as possible. diff --git a/README.md b/README.md index 61dcc9c..2521d30 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ [![Travis build status](https://travis-ci.org/moodymudskipper/unglue.svg?branch=master)](https://travis-ci.org/moodymudskipper/unglue) +[![Codecov test +coverage](https://codecov.io/gh/moodymudskipper/unglue/branch/master/graph/badge.svg)](https://codecov.io/gh/moodymudskipper/unglue?branch=master) + # unglue @@ -112,7 +115,7 @@ conversion function such as `readr::type_convert`, or to a formula is ### `unglue_unnest()` `unglue_unnest()` is named as a tribute to `tidyr::unnest()` as it’s -equivalent to using sucessively `unglue()` and `unnest()` on a data +equivalent to using successively `unglue()` and `unnest()` on a data frame column. It is similar to `tidyr::extract()` in its syntax and efforts were made to make it as consistent as possible. diff --git a/man/unglue.Rd b/man/unglue.Rd index b7f91b6..ca1dedc 100644 --- a/man/unglue.Rd +++ b/man/unglue.Rd @@ -72,7 +72,7 @@ is supported if the package \code{rlang} is installed.} \item{col}{column containing the character vector to extract values from.} -\item{remove}{wether to remove the column \code{col} once extraction is performed} +\item{remove}{whether to remove the column \code{col} once extraction is performed} } \value{ For \code{unglue()}a list of one row data frames, for \code{unglue_data} a @@ -90,7 +90,7 @@ Depending on the task you might want: \item \code{unglue_data()} to return a data frame from a character vector, just as \code{glue::glue_data()} does in reverse \item \code{unglue()} to return a list of data frames containing the matches -\item \code{unglue_vec()} to extract one value by element of \code{x}, chosen by indice or by +\item \code{unglue_vec()} to extract one value by element of \code{x}, chosen by index or by name. \item \code{unglue_unnest()} to extract value from a column of a data frame to new columns } diff --git a/man/unglue_detect.Rd b/man/unglue_detect.Rd index 1955378..6e40e85 100644 --- a/man/unglue_detect.Rd +++ b/man/unglue_detect.Rd @@ -39,7 +39,7 @@ is supported if the package \code{rlang} is installed.} a vector of logical. } \description{ -Returns a logical indicating wether input strings were matched by one or more patterns +Returns a logical indicating whether input strings were matched by one or more patterns } \examples{ sentences <- c("666 is [a number]", "foo is [a word]", diff --git a/man/unglue_regex.Rd b/man/unglue_regex.Rd index e212cba..1102545 100644 --- a/man/unglue_regex.Rd +++ b/man/unglue_regex.Rd @@ -21,13 +21,13 @@ items will be pasted using an empty separator (\code{""}).} \item{close}{The closing delimiter.} -\item{use_multiple}{wether we should consider that duplicate labels can match +\item{use_multiple}{whether we should consider that duplicate labels can match different substrings.} -\item{named_capture}{wether to incorporate the names of the groups in the -ouput regex} +\item{named_capture}{whether to incorporate the names of the groups in the +output regex} -\item{attributes}{wether to give group attributes to the output} +\item{attributes}{whether to give group attributes to the output} } \value{ a character vector.