stringr v0.3


Monthly downloads



by Hadley Wickham

Make it easier to work with strings.

stringr is a set of simple wrappers that make R's string functions more consistent, simpler and easier to use. It does this by ensuring that: function and argument names (and positions) are consistent, all functions deal with NA's and zero length character appropriately, and the output data structures from each function matches the input data structures of other functions.

Functions in stringr

Name Description
check_string Check that stringr is of the correct type for stringr functions...
str_match Extract first matched group from a string.
str_locate Locate the position of the first occurence of a pattern in a string.
str_extract Extract first piece of a string that matches a pattern.
str_replace Replace replaced occurences of a matched pattern in a string.
str_pad Pad a string.
fixed Escape all special regular expression characters.
str_split_fixed Split up a string into a fixed number of pieces.
str_detect Detect the presence or absence of a pattern in a string.
str_extract_all Extract all pieces of a string that match a pattern.
str_sub Extract substrings from a character vector.
invert_match Invert a matrix of locations...
check_pattern Check that pattern is of the correct type for stringr functions...
str_locate_all Locate the position of all occurences of a pattern in a string.
str_split Split up a string into a variable number of pieces.
str_trim Trim whitespace from start and end of string.
str_dup Duplicate and concatenate strings within a character vector.
str_match_all Extract all matched groups from a string.
str_c Join multiple strings into a single string.
str_length The length of a string (in characters).
No Results!

Last month downloads


Type Package
License GPL-2
Collate 'checks.r' 'detect.r' 'dup.r' 'extract.r' 'fixed.r' 'join.r' 'length.r' 'locate.r' 'match.r' 'replace.r' 'split.r' 'sub.r'
Packaged 2010-02-15 14:21:17 UTC; hadley
Repository CRAN
Date/Publication 2010-02-15 17:05:46
depends plyr
Contributors Hadley Wickham

Include our badge in your README