Extra String Manipulation Functions

There are some things that I wish were easier with the 'stringr' or 'stringi' packages. The foremost of these is the extraction of numbers from strings. 'stringr' and 'stringi' make you figure out the regular expression for yourself; 'strex' takes care of this for you. There are many other handy functionalities in 'strex'. Contributions to this package are encouraged: it is intended as a miscellany of string manipulation functions that cannot be found in 'stringi' or 'stringr'.


There are some things that I wish were easier with the stringr or stringi packages. The foremost of these is the extraction of numbers from strings. stringr lets you figure this out the regex for yourself; strex takes care of this for you. There are many more useful functionalities in strex. In particular, there’s a match_arg() function which is more flexible than the base match.arg(). Contributions to this package are encouraged: it is intended as a miscellany of string manipulation functions which cannot be found in stringi or stringr.

Travis-CI BuildStatus AppVeyor buildstatus Coveragestatus

Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. lifecycle

CRANstatus RStudio CRANdownloads RStudioCRAN monthly downloads Rdocumentation

Installation

You can install the release version of strex from CRAN with:

install.packages("strex")

You can install the development version of strex from GitHub with:

devtools::install_github("rorynolan/strex")

How to use the package

See the package website at https://rorynolan.github.io/strex.

News

strex 1.0.1

BUG FIXES

  • There was a pervasive bug related to handling of zero-length inputs.

strex 1.0.0

BREAKING CHANGES

  • str_split_by_nums() has been renamed to str_split_by_numbers() for consistency with str_extract_numbers().
  • str_get_currencies() has been renamed to str_extract_currencies() and been greatly improved.
  • str_get_currency() has been replaced by str_nth_currency() with siblings str_first_currency() and str_last_currency().
  • str_match_arg() has been updated to behave more like base::match_arg().

NEW FEATURES

  • str_elems() has been added. It is a vectorized version of str_elem().
  • The number (and non-numeric) extraction functions can now deal with scientific notation and with comma-separated numbers. This makes str_first_number() more versatile than as.numeric() since as.numeric("1,000") returns NA but str_first_number("1,000") returns the number 1000.

strex 0.1.3

BUG FIXES

  • Require necessary version of glue.

strex 0.1.2

BUG FIXES

  • Require necessary version of ore.

strex 0.1.1

BUG FIXES

  • Allow for unexpected error message on mac.

strex 0.1.0

  • The first incarnation.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("strex")

1.1.1 by Rory Nolan, a month ago


https://rorynolan.github.io/strex, https://github.com/rorynolan/strex


Report a bug at https://github.com/rorynolan/strex/issues


Browse source code at https://github.com/cran/strex


Authors: Rory Nolan [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports Rcpp, magrittr, checkmate, matrixStats, ore, rlang, tibble, glue, stringi, processx, stats

Depends on stringr

Suggests testthat, knitr, rmarkdown, pacman, covr, spelling, purrr

Linking to Rcpp

System requirements: C++11


Imported by filesstrings.


See at CRAN