stringb: Convenient Base R String Handling

Share:

Base R already ships with string handling capabilities 'out- of-the-box' but lacks streamlined function names and workflow. The 'stringi' ('stringr') package on the other hand has well named functions, extensive Unicode support and allows for a streamlined workflow. On the other hand it adds dependencies and regular expression interpretation between base R functions and 'stringi' functions might differ. This packages aims at providing a solution to the use case of unwanted dependencies on the one hand but the need for streamlined text processing on the other. The packages' functions are solely based on wrapping base R functions into 'stringr'/'stringi' like function names. Along the way it adds one or two extra functions and last but not least provides all functions as generics, therefore allowing for adding methods for other text structures besides plain character vectors.

Author
Peter Meissner [aut, cre]
Date of publication
2016-11-01 15:18:21
Maintainer
Peter Meissner <retep.meissner@gmail.com>
License
MIT + file LICENSE
Version
0.1.13
URLs

View on CRAN

Man pages

as.data.frame
a stringsAsFactors=FALSE as.data.frame
cuts_to_spans
helper function that turns cut points into spans
data.frame
a stringsAsFactors=FALSE data.frame
de_sequenize
helper function to transforms sequences into spans
drop_non_group_matches
helper for usage of regmatches
dummy_func
imports
get_groups
helper function for text_extract_group
grapes-.-grapes
concatenating strings operator
grapes-..-grapes
concatenating strings
invert_spans
function to invert spans to those numbers not covered
plot.character
function for plotting text
regmatches2
helper function to standardize regexpr results
sequenize
helper function to spans into sequences
stringb_arrange
function to sort df by variables
test_file
text function: wrapper for system.file() to access test files
text_c
generic for concatenating strings
text_collapse
function for collapsing text vectors
text_count
generic for counting pattern occurences
text_delete
deleting patterns in string
text_detect
generic function to test if a regex can be found within a...
text_eval
wrapper function of eval() and parse() to evaluate character...
text_extract
extract regex matches
text_extract_all
extract regex matches
text_extract_group
generic for getting regex group matches
text_extract_group_all
generic for getting all regex group matches
text_filter
generic for subsetting/filtering vectors
text_length
wrapper around nchar to return text length
text_locate
function to get start, end, length form pattern match
text_locate_all
function to get start, end, length form pattern match for all...
text_locate_all_worker
helper function to get start, end, length form pattern match
text_locate_group
generic for getting positions regex groups
text_locate_worker
helper function to get start, end, length form pattern match
text_nchar
wrapper around nchar to return text length
text_pad
padding text to specified width
text_read
read in text
text_rep
generic repeating text
text_replace
replacing patterns in string
text_replace_all
replacing patterns in string
text_replace_group
function for replacing regex group matches generic for...
text_replace_locates
text_replace_locates default
text_show
showing text
text_snippet
retrieving text snippet
text_split
generic splitting strings
text_split_n
generic splitting strings into pieces of length n
text_sub
generic for extracting characters sequences by position
text_subset
generic for subsetting/filtering vectors
text_tokenize
generic for gregexpr wrappers to tokenize text
text_tokenize_lines
generic to tokenize text into lines
text_tokenize_sentences
generic to tokenize text into sentences
text_tokenize_words
generic to tokenize text into words
text_to_lower
function for make text lower case
text_to_title_case
function for make text lower case
text_to_upper
function for make text lower case
text_trim
trim spaces
text_which
generic function to know in which elements a pattern can be...
text_which_value
generic function to get whole elements in which pattern was...
text_wrap
wraping text to specified width
text_write
write text to file

Files in this package

stringb
stringb/inst
stringb/inst/testfiles
stringb/inst/testfiles/rc_2_ch1.txt
stringb/inst/testfiles/test_utf8.txt
stringb/inst/testfiles/rc_1_ch1.txt
stringb/inst/testfiles/rc_1.txt
stringb/inst/testfiles/rc_3.txt
stringb/inst/testfiles/rc_3_ch1.txt
stringb/inst/testfiles/test_latin1.txt
stringb/inst/testfiles/rc_2.txt
stringb/tests
stringb/tests/testthat
stringb/tests/testthat/test_text_to_lower.R
stringb/tests/testthat/test_text_count.r
stringb/tests/testthat/test_tools.R
stringb/tests/testthat/test_text_detect.r
stringb/tests/testthat/test_text_read.r
stringb/tests/testthat/test_text_replace.R
stringb/tests/testthat/test_text_rep.r
stringb/tests/testthat/test_text_which.R
stringb/tests/testthat/test_text_collapse.R
stringb/tests/testthat/test_text_split.r
stringb/tests/testthat/test_text_tokenize.r
stringb/tests/testthat/test_text_c.R
stringb/tests/testthat/test_text_eval.R
stringb/tests/testthat/test_text_snippet.r
stringb/tests/testthat/test_text_locate.r
stringb/tests/testthat/test_text_trim.R
stringb/tests/testthat/test_text_locate_all.r
stringb/tests/test-all.R
stringb/NAMESPACE
stringb/NEWS.md
stringb/R
stringb/R/text_replace_group.R
stringb/R/text_show.R
stringb/R/text_extract_group.R
stringb/R/text_sub.R
stringb/R/text_locate_group.R
stringb/R/text_collapse.R
stringb/R/text_locate.R
stringb/R/text_length.R
stringb/R/text_extract_all.R
stringb/R/text_split.R
stringb/R/text_which.R
stringb/R/text_to_lower.R
stringb/R/text_detect.R
stringb/R/text_extract.R
stringb/R/text_pad.R
stringb/R/imports.r
stringb/R/text_write.R
stringb/R/text_count.R
stringb/R/tools.R
stringb/R/text_dup.R
stringb/R/text_c.R
stringb/R/text_replace.R
stringb/R/text_eval.R
stringb/R/character_plot.R
stringb/R/text_read.R
stringb/R/text_tokenize.R
stringb/R/text_trim.R
stringb/R/text_wrap.R
stringb/R/text_snippet.R
stringb/R/zzz.R
stringb/README.md
stringb/MD5
stringb/DESCRIPTION
stringb/man
stringb/man/text_locate_all.Rd
stringb/man/text_pad.Rd
stringb/man/test_file.Rd
stringb/man/text_sub.Rd
stringb/man/text_snippet.Rd
stringb/man/invert_spans.Rd
stringb/man/text_split_n.Rd
stringb/man/data.frame.Rd
stringb/man/text_count.Rd
stringb/man/as.data.frame.Rd
stringb/man/cuts_to_spans.Rd
stringb/man/text_locate_all_worker.Rd
stringb/man/text_tokenize_words.Rd
stringb/man/text_replace_all.Rd
stringb/man/regmatches2.Rd
stringb/man/text_to_title_case.Rd
stringb/man/text_length.Rd
stringb/man/text_detect.Rd
stringb/man/text_wrap.Rd
stringb/man/text_write.Rd
stringb/man/text_replace.Rd
stringb/man/text_tokenize_lines.Rd
stringb/man/text_replace_locates.Rd
stringb/man/sequenize.Rd
stringb/man/text_extract_all.Rd
stringb/man/text_locate_group.Rd
stringb/man/text_tokenize_sentences.Rd
stringb/man/dummy_func.Rd
stringb/man/drop_non_group_matches.Rd
stringb/man/text_extract_group_all.Rd
stringb/man/get_groups.Rd
stringb/man/text_locate_worker.Rd
stringb/man/text_tokenize.Rd
stringb/man/text_show.Rd
stringb/man/text_which.Rd
stringb/man/text_extract.Rd
stringb/man/text_nchar.Rd
stringb/man/grapes-..-grapes.Rd
stringb/man/text_extract_group.Rd
stringb/man/text_delete.Rd
stringb/man/text_which_value.Rd
stringb/man/text_rep.Rd
stringb/man/text_eval.Rd
stringb/man/text_to_lower.Rd
stringb/man/text_trim.Rd
stringb/man/text_replace_group.Rd
stringb/man/grapes-.-grapes.Rd
stringb/man/plot.character.Rd
stringb/man/text_c.Rd
stringb/man/text_filter.Rd
stringb/man/text_split.Rd
stringb/man/text_subset.Rd
stringb/man/de_sequenize.Rd
stringb/man/stringb_arrange.Rd
stringb/man/text_locate.Rd
stringb/man/text_read.Rd
stringb/man/text_collapse.Rd
stringb/man/text_to_upper.Rd
stringb/LICENSE