diff --git a/news/index.html b/news/index.html
index cd79cdd..e07bf5f 100644
--- a/news/index.html
+++ b/news/index.html
@@ -36,6 +36,10 @@
Source: NEWS.md
+
charcuterie 0.0.5
- added
count()
; “strawberry” has 3 ’r’s
diff --git a/pkgdown.yml b/pkgdown.yml
index e290262..5cc3229 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -4,7 +4,7 @@ pkgdown_sha: ~
articles:
usage: usage.html
use_cases: use_cases.html
-last_built: 2024-11-07T21:14Z
+last_built: 2024-11-07T21:30Z
urls:
reference: https://jonocarroll.github.io/charcuterie/reference
article: https://jonocarroll.github.io/charcuterie/articles
diff --git a/search.json b/search.json
index 8f1b07c..722f565 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://jonocarroll.github.io/charcuterie/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 charcuterie authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"test-membership","dir":"Articles","previous_headings":"","what":"Test Membership","title":"Use Cases","text":"letters vowels (aeiou)? Since %% vectorised, works nicely chars object","code":"vowels <- function(word) { ch <- chars(word) setNames(ch %in% chars(\"aeiou\"), ch) } vowels(\"string\") #> s t r i n g #> FALSE FALSE FALSE TRUE FALSE FALSE vowels(\"banana\") #> b a n a n a #> FALSE TRUE FALSE TRUE FALSE TRUE banana <- chars(\"banana\") banana[which(banana %in% chars(\"aeiou\"))] #> [1] \"aaa\" onomatopoeia <- chars(\"onomatopoeia\") onomatopoeia[which(onomatopoeia %in% chars(\"aeiou\"))] #> [1] \"ooaooeia\""},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"iterate","dir":"Articles","previous_headings":"","what":"Iterate","title":"Use Cases","text":"“Strings” finally iterable","code":"for (x in chars(\"ABC\")) { print(paste(\"Appendix\", x)) } #> [1] \"Appendix A\" #> [1] \"Appendix B\" #> [1] \"Appendix C\""},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"identify-palindromes","dir":"Articles","previous_headings":"","what":"Identify Palindromes","title":"Use Cases","text":"word palindrome (spelled forwards backwards)?","code":"palindrome <- function(a, ignore_spaces = FALSE) { a <- chars(a) if (ignore_spaces) a <- except(a, \" \") all(rev(a) == a) } palindrome(\"palindrome\") #> [1] FALSE palindrome(\"racecar\") #> [1] TRUE palindrome(\"never odd or even\", ignore_spaces = TRUE) #> [1] TRUE palindrome(\"go hang a salami im a lasagna hog\", ignore_spaces = TRUE) #> [1] TRUE"},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"find-anagrams","dir":"Articles","previous_headings":"","what":"Find Anagrams","title":"Use Cases","text":"two words just rearrangements letters?","code":"anagram <- function(a, b) { is_anagram <- function(a, b) { length(a) == length(b) && all(sort(a) == sort(b)) } sapply(candidates, \\(x) is_anagram(chars(a), chars(x))) } target <- \"stressed\" candidates <- c(\"started\", \"desserts\", \"rested\") anagram(target, candidates) #> started desserts rested #> FALSE TRUE FALSE"},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"spongebob-case","dir":"Articles","previous_headings":"","what":"Spongebob Case","title":"Use Cases","text":"Make every second letter uppercase","code":"spongebob <- function(phrase) { x <- chars(phrase) odds <- seq(1, length(x), 2) x[odds] <- toupper(x[odds]) string(x) } spongebob(\"you can't do anything useful with this package\") #> [1] \"YoU CaN'T Do aNyThInG UsEfUl wItH ThIs pAcKaGe\""},{"path":"https://jonocarroll.github.io/charcuterie/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jonathan Carroll. Author, maintainer.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Carroll J (2024). charcuterie: Handle Strings Vectors Characters. R package version 0.0.6, https://jonocarroll.github.io/charcuterie/, https://github.com/jonocarroll/charcuterie.","code":"@Manual{, title = {charcuterie: Handle Strings as Vectors of Characters}, author = {Jonathan Carroll}, year = {2024}, note = {R package version 0.0.6, https://jonocarroll.github.io/charcuterie/}, url = {https://github.com/jonocarroll/charcuterie}, }"},{"path":"https://jonocarroll.github.io/charcuterie/index.html","id":"charcuterie-","dir":"","previous_headings":"","what":"Handle Strings as Vectors of Characters","title":"Handle Strings as Vectors of Characters","text":"goal {charcuterie} finally strings iterable character vectors.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Handle Strings as Vectors of Characters","text":"can install published version CRAN can install development version ","code":"install.packages(\"charcuterie\") # install.packages(\"remotes\") remotes::install_github(\"jonocarroll/charcuterie\")"},{"path":"https://jonocarroll.github.io/charcuterie/index.html","id":"motivation","dir":"","previous_headings":"","what":"Motivation","title":"Handle Strings as Vectors of Characters","text":"See blog post: https://jcarroll.com.au/2024/08/03/charcuterie---strings--iterable--r/ programming languages seem treat string array characters, R, “string” object type “character” length 1. number ‘characters’ string obtained via nchar(x) otherwise, individual ‘characters’ comprising string rarely exposed. common route around limitation split string smaller strings, containing single character, .e. produces list strings, single character. cumbersome type , package offers cleaner approach () looks like nothing, ’s point - still looks like “string”. ’s actually vector, though","code":"strsplit(\"string\", split = \"\") #> [[1]] #> [1] \"s\" \"t\" \"r\" \"i\" \"n\" \"g\" library(charcuterie) #> #> Attaching package: 'charcuterie' #> The following objects are masked from 'package:base': #> #> intersect, setdiff, union s <- chars(\"string\") s #> [1] \"string\" unclass(s) #> [1] \"s\" \"t\" \"r\" \"i\" \"n\" \"g\""},{"path":"https://jonocarroll.github.io/charcuterie/index.html","id":"example-usage","dir":"","previous_headings":"","what":"Example Usage","title":"Handle Strings as Vectors of Characters","text":"means can finally vector things , like reverse sort index count elements {charcuterie} defines S3 methods functions wide range operations performed string built vector characters index [ concatenate c print format print slice head tail reverse rev sort sort set operations setdiff, union, intersect, new except leverage existing vectorised operations like unique, toupper, tolower detailed usage examples, see vignettes.","code":"rev(s) #> [1] \"gnirts\" sort(s) #> [1] \"ginrst\" s[3] #> [1] \"r\" count(chars(\"strawberry\"), \"r\") #> [1] 3"},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine chars Objects — c.chars","title":"Combine chars Objects — c.chars","text":"Combine chars Objects","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine chars Objects — c.chars","text":"","code":"# S3 method for class 'chars' c(...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine chars Objects — c.chars","text":"... chars objects.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine chars Objects — c.chars","text":"larger chars object containing combined elements ....","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine chars Objects — c.chars","text":"","code":"c(chars(\"java\"), chars(\"script\")) #> [1] \"javascript\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/charcuterie-package.html","id":null,"dir":"Reference","previous_headings":"","what":"charcuterie: Handle Strings as Vectors of Characters — charcuterie-package","title":"charcuterie: Handle Strings as Vectors of Characters — charcuterie-package","text":"Creates new chars class looks like string actually vector individual characters, making 'strings' iterable. class enables vector operations 'strings' reverse, sort, head, set operations.","code":""},{"path":[]},{"path":"https://jonocarroll.github.io/charcuterie/reference/charcuterie-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"charcuterie: Handle Strings as Vectors of Characters — charcuterie-package","text":"Maintainer: Jonathan Carroll rpkg@jcarroll.com.au (ORCID)","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a chars Object From a String — chars.character","title":"Create a chars Object From a String — chars.character","text":"Create chars Object String","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a chars Object From a String — chars.character","text":"","code":"# S3 method for class 'character' chars(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a chars Object From a String — chars.character","text":"x string convert chars object (length 1 ). ... unused","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a chars Object From a String — chars.character","text":"object class chars, essentially splitting string individual characters","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a chars Object From a String — chars.character","text":"chars expects single string input. create list , consider lapply(strings, chars)","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.default.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an Object to chars — chars.default","title":"Convert an Object to chars — chars.default","text":"Convert Object chars","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.default.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an Object to chars — chars.default","text":"","code":"# Default S3 method chars(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.default.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an Object to chars — chars.default","text":"x object convert ... options","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.default.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert an Object to chars — chars.default","text":".NotYetImplemented() error","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a chars Object — chars","title":"Create a chars Object — chars","text":"Create chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a chars Object — chars","text":"","code":"chars(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a chars Object — chars","text":"x object convert chars. ... options passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a chars Object — chars","text":"object class chars.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":null,"dir":"Reference","previous_headings":"","what":"Count Characters in a Chars Object — count","title":"Count Characters in a Chars Object — count","text":"Count Characters Chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count Characters in a Chars Object — count","text":"","code":"count(x, value, ignore.case = FALSE)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count Characters in a Chars Object — count","text":"x vector characters. value character (length 1) count ignore.case letter case ignored?","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count Characters in a Chars Object — count","text":"integer, count instances value x","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count Characters in a Chars Object — count","text":"","code":"count(chars(\"strawberry\"), 3) #> [1] 0"},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":null,"dir":"Reference","previous_headings":"","what":"Elements of x Except Those in y — except","title":"Elements of x Except Those in y — except","text":"treat operation set.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Elements of x Except Those in y — except","text":"","code":"except(x, y)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Elements of x Except Those in y — except","text":"x larger vector. y smaller vector.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Elements of x Except Those in y — except","text":"elements x appearing y.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Elements of x Except Those in y — except","text":"","code":"except(c(1:5), 3) #> [1] 1 2 4 5 except(chars(\"abcde\"), \"c\") #> [1] \"abde\" except(chars(\"abracadabra\"), \"b\") #> [1] \"aracadara\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/format.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a chars Object — format.chars","title":"Format a chars Object — format.chars","text":"Format chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/format.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a chars Object — format.chars","text":"","code":"# S3 method for class 'chars' format(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/format.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a chars Object — format.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/format.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format a chars Object — format.chars","text":"formatted chars object.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the First Parts of a chars Object — head.chars","title":"Return the First Parts of a chars Object — head.chars","text":"Return First Parts chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the First Parts of a chars Object — head.chars","text":"","code":"# S3 method for class 'chars' head(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the First Parts of a chars Object — head.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the First Parts of a chars Object — head.chars","text":"first (n) elements chars object chars object.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return the First Parts of a chars Object — head.chars","text":"","code":"head(chars(\"abcdefhgi\")) #> [1] \"abcdef\" head(chars(\"javascript\"), 4) #> [1] \"java\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Setwise Intersection of chars Objects — intersect.chars","title":"Setwise Intersection of chars Objects — intersect.chars","text":"Setwise Intersection chars Objects","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setwise Intersection of chars Objects — intersect.chars","text":"","code":"# S3 method for class 'chars' intersect(x, y, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setwise Intersection of chars Objects — intersect.chars","text":"x chars object. y chars object character vector. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Setwise Intersection of chars Objects — intersect.chars","text":"setwise intersection x y.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Setwise Intersection of chars Objects — intersect.chars","text":"","code":"union(chars(\"pine\"), chars(\"apple\")) #> [1] \"pineal\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Character a Letter OR a Number? — is_alnum","title":"Is a Character a Letter OR a Number? — is_alnum","text":"combination is_letter() is_number().","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Character a Letter OR a Number? — is_alnum","text":"","code":"is_alnum(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Character a Letter OR a Number? — is_alnum","text":"x vector characters.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Character a Letter OR a Number? — is_alnum","text":"boolean vector indicating whether element x letter number.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Character a Letter OR a Number? — is_alnum","text":"","code":"is_alnum(chars(\"Lee7c0deR 4 L1fe\")) #> L e e 7 c 0 d e R 4 L #> TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE #> 1 f e #> TRUE TRUE TRUE Filter(is_alnum, chars(\"2 B or !2 B\")) #> [1] \"2Bor2B\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Character a Letter? — is_letter","title":"Is a Character a Letter? — is_letter","text":"Compares values letters (English alphabet), ignoring case.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Character a Letter? — is_letter","text":"","code":"is_letter(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Character a Letter? — is_letter","text":"x vector characters.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Character a Letter? — is_letter","text":"boolean vector indicating whether element x letter (appears letters ignoring case).","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Character a Letter? — is_letter","text":"","code":"is_letter(chars(\"Lee7c0deR\")) #> L e e 7 c 0 d e R #> TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE Filter(is_letter, chars(\"w00t\")) #> [1] \"wt\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Character a Number? — is_number","title":"Is a Character a Number? — is_number","text":"Compares values 0:9 (number).","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Character a Number? — is_number","text":"","code":"is_number(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Character a Number? — is_number","text":"x vector characters.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Character a Number? — is_number","text":"boolean vector indicating whether element x number (appears 0:9 number)","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Character a Number? — is_number","text":"","code":"is_number(chars(\"Lee7c0deR\")) #> L e e 7 c 0 d e R #> FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE Filter(is_number, chars(\"w00t\")) #> [1] \"00\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Character Punctuation? — is_punct","title":"Is a Character Punctuation? — is_punct","text":"Compares regex group [[:punct:]].","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Character Punctuation? — is_punct","text":"","code":"is_punct(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Character Punctuation? — is_punct","text":"x vector characters.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Character Punctuation? — is_punct","text":"boolean vector indicating whether element x considered punctuation.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Character Punctuation? — is_punct","text":"","code":"is_punct(chars(\"I can haz?\")) #> I c a n h a z ? #> FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE Filter(Negate(is_punct), chars(\"abc,123;$*%?\")) #> [1] \"abc123\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/print.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a chars Object — print.chars","title":"Print a chars Object — print.chars","text":"Print chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/print.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a chars Object — print.chars","text":"","code":"# S3 method for class 'chars' print(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/print.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a chars Object — print.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/print.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a chars Object — print.chars","text":"x (invisibly), used print console.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. generics intersect, setdiff, union","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Reverse Elements of a chars Object — rev.chars","title":"Reverse Elements of a chars Object — rev.chars","text":"Reverse Elements chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reverse Elements of a chars Object — rev.chars","text":"","code":"# S3 method for class 'chars' rev(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reverse Elements of a chars Object — rev.chars","text":"x chars object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reverse Elements of a chars Object — rev.chars","text":"chars object elements reversed.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reverse Elements of a chars Object — rev.chars","text":"","code":"rev(chars(\"racecar\")) #> [1] \"racecar\" rev(chars(\"alphabet\")) #> [1] \"tebahpla\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Setwise Difference Between chars Objects — setdiff.chars","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"Setwise Difference chars Objects","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"","code":"# S3 method for class 'chars' setdiff(x, y, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"x chars object. y chars object character vector. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"setwise difference x y.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"","code":"setdiff(chars(\"javascript\"), chars(\"script\")) #> [1] \"jav\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort a chars Object — sort.chars","title":"Sort a chars Object — sort.chars","text":"Sort chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort a chars Object — sort.chars","text":"","code":"# S3 method for class 'chars' sort(x, decreasing = FALSE, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort a chars Object — sort.chars","text":"x chars object. decreasing logical. sort increasing decreasing? available partial sorting. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sort a chars Object — sort.chars","text":"sorted chars object.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sort a chars Object — sort.chars","text":"","code":"sort(chars(\"alphabet\")) #> [1] \"aabehlpt\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/string.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a String From a chars Object — string","title":"Create a String From a chars Object — string","text":"Create String chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a String From a chars Object — string","text":"","code":"string(x, collapse = \"\", ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a String From a chars Object — string","text":"x one chars objects. collapse optional character string separate results. NA_character_. ... arguments passed paste()","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a String From a chars Object — string","text":"character (traditional R string) elements x single value.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract or Replace Parts of a chars Object — [.chars","title":"Extract or Replace Parts of a chars Object — [.chars","text":"Extract Replace Parts chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract or Replace Parts of a chars Object — [.chars","text":"","code":"# S3 method for class 'chars' x[...]"},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract or Replace Parts of a chars Object — [.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract or Replace Parts of a chars Object — [.chars","text":"extracted parts chars object, chars object replacements performed.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract or Replace Parts of a chars Object — [.chars","text":"","code":"s <- chars(\"censor\") s[2:5] #> [1] \"enso\" s[2:5] <- \"X\" s #> [1] \"cXXXXr\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the Last Parts of a chars Object — tail.chars","title":"Return the Last Parts of a chars Object — tail.chars","text":"Return Last Parts chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the Last Parts of a chars Object — tail.chars","text":"","code":"# S3 method for class 'chars' tail(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the Last Parts of a chars Object — tail.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the Last Parts of a chars Object — tail.chars","text":"last (n) elements chars object chars object.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return the Last Parts of a chars Object — tail.chars","text":"","code":"tail(chars(\"javascript\")) #> [1] \"script\" tail(chars(\"abcdefghi\")) #> [1] \"defghi\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Setwise Union of chars Objects — union.chars","title":"Setwise Union of chars Objects — union.chars","text":"Setwise Union chars Objects","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setwise Union of chars Objects — union.chars","text":"","code":"# S3 method for class 'chars' union(x, y, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setwise Union of chars Objects — union.chars","text":"x chars object. y chars object character vector. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Setwise Union of chars Objects — union.chars","text":"setwise union x y.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Setwise Union of chars Objects — union.chars","text":"","code":"union(chars(\"java\"), chars(\"script\")) #> [1] \"javscript\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Unique Elements of chars Objects. — unique.chars","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"Extract Unique Elements chars Objects.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"","code":"# S3 method for class 'chars' unique(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"chars object containing unique elements.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"","code":"unique(chars(\"mississippi\")) #> [1] \"misp\""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-005","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.5","title":"charcuterie 0.0.5","text":"added count(); “strawberry” 3 ’r’s","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-004","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.4","title":"charcuterie 0.0.4","text":"CRAN release: 2024-09-13 fix CRAN error vignette image added is_number(), is_letter(), is_alnum(), is_punct()","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-003","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.3","title":"charcuterie 0.0.3","text":"CRAN release: 2024-09-10 reworked documentation updated interface string","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-002","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.2","title":"charcuterie 0.0.2","text":"use {generics} setdiff, union, intersect generics - thanks @DavisVaughan","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-001","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.1","title":"charcuterie 0.0.1","text":"refactored internals - thanks @barryrowlingson","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-0009000","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.0.9000","title":"charcuterie 0.0.0.9000","text":"Initial version","code":""}]
+[{"path":"https://jonocarroll.github.io/charcuterie/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 charcuterie authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"test-membership","dir":"Articles","previous_headings":"","what":"Test Membership","title":"Use Cases","text":"letters vowels (aeiou)? Since %% vectorised, works nicely chars object","code":"vowels <- function(word) { ch <- chars(word) setNames(ch %in% chars(\"aeiou\"), ch) } vowels(\"string\") #> s t r i n g #> FALSE FALSE FALSE TRUE FALSE FALSE vowels(\"banana\") #> b a n a n a #> FALSE TRUE FALSE TRUE FALSE TRUE banana <- chars(\"banana\") banana[which(banana %in% chars(\"aeiou\"))] #> [1] \"aaa\" onomatopoeia <- chars(\"onomatopoeia\") onomatopoeia[which(onomatopoeia %in% chars(\"aeiou\"))] #> [1] \"ooaooeia\""},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"iterate","dir":"Articles","previous_headings":"","what":"Iterate","title":"Use Cases","text":"“Strings” finally iterable","code":"for (x in chars(\"ABC\")) { print(paste(\"Appendix\", x)) } #> [1] \"Appendix A\" #> [1] \"Appendix B\" #> [1] \"Appendix C\""},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"identify-palindromes","dir":"Articles","previous_headings":"","what":"Identify Palindromes","title":"Use Cases","text":"word palindrome (spelled forwards backwards)?","code":"palindrome <- function(a, ignore_spaces = FALSE) { a <- chars(a) if (ignore_spaces) a <- except(a, \" \") all(rev(a) == a) } palindrome(\"palindrome\") #> [1] FALSE palindrome(\"racecar\") #> [1] TRUE palindrome(\"never odd or even\", ignore_spaces = TRUE) #> [1] TRUE palindrome(\"go hang a salami im a lasagna hog\", ignore_spaces = TRUE) #> [1] TRUE"},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"find-anagrams","dir":"Articles","previous_headings":"","what":"Find Anagrams","title":"Use Cases","text":"two words just rearrangements letters?","code":"anagram <- function(a, b) { is_anagram <- function(a, b) { length(a) == length(b) && all(sort(a) == sort(b)) } sapply(candidates, \\(x) is_anagram(chars(a), chars(x))) } target <- \"stressed\" candidates <- c(\"started\", \"desserts\", \"rested\") anagram(target, candidates) #> started desserts rested #> FALSE TRUE FALSE"},{"path":"https://jonocarroll.github.io/charcuterie/articles/use_cases.html","id":"spongebob-case","dir":"Articles","previous_headings":"","what":"Spongebob Case","title":"Use Cases","text":"Make every second letter uppercase","code":"spongebob <- function(phrase) { x <- chars(phrase) odds <- seq(1, length(x), 2) x[odds] <- toupper(x[odds]) string(x) } spongebob(\"you can't do anything useful with this package\") #> [1] \"YoU CaN'T Do aNyThInG UsEfUl wItH ThIs pAcKaGe\""},{"path":"https://jonocarroll.github.io/charcuterie/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jonathan Carroll. Author, maintainer.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Carroll J (2024). charcuterie: Handle Strings Vectors Characters. R package version 0.0.6, https://jonocarroll.github.io/charcuterie/, https://github.com/jonocarroll/charcuterie.","code":"@Manual{, title = {charcuterie: Handle Strings as Vectors of Characters}, author = {Jonathan Carroll}, year = {2024}, note = {R package version 0.0.6, https://jonocarroll.github.io/charcuterie/}, url = {https://github.com/jonocarroll/charcuterie}, }"},{"path":"https://jonocarroll.github.io/charcuterie/index.html","id":"charcuterie-","dir":"","previous_headings":"","what":"Handle Strings as Vectors of Characters","title":"Handle Strings as Vectors of Characters","text":"goal {charcuterie} finally strings iterable character vectors.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Handle Strings as Vectors of Characters","text":"can install published version CRAN can install development version ","code":"install.packages(\"charcuterie\") # install.packages(\"remotes\") remotes::install_github(\"jonocarroll/charcuterie\")"},{"path":"https://jonocarroll.github.io/charcuterie/index.html","id":"motivation","dir":"","previous_headings":"","what":"Motivation","title":"Handle Strings as Vectors of Characters","text":"See blog post: https://jcarroll.com.au/2024/08/03/charcuterie---strings--iterable--r/ programming languages seem treat string array characters, R, “string” object type “character” length 1. number ‘characters’ string obtained via nchar(x) otherwise, individual ‘characters’ comprising string rarely exposed. common route around limitation split string smaller strings, containing single character, .e. produces list strings, single character. cumbersome type , package offers cleaner approach () looks like nothing, ’s point - still looks like “string”. ’s actually vector, though","code":"strsplit(\"string\", split = \"\") #> [[1]] #> [1] \"s\" \"t\" \"r\" \"i\" \"n\" \"g\" library(charcuterie) #> #> Attaching package: 'charcuterie' #> The following objects are masked from 'package:base': #> #> intersect, setdiff, union s <- chars(\"string\") s #> [1] \"string\" unclass(s) #> [1] \"s\" \"t\" \"r\" \"i\" \"n\" \"g\""},{"path":"https://jonocarroll.github.io/charcuterie/index.html","id":"example-usage","dir":"","previous_headings":"","what":"Example Usage","title":"Handle Strings as Vectors of Characters","text":"means can finally vector things , like reverse sort index count elements {charcuterie} defines S3 methods functions wide range operations performed string built vector characters index [ concatenate c print format print slice head tail reverse rev sort sort set operations setdiff, union, intersect, new except leverage existing vectorised operations like unique, toupper, tolower detailed usage examples, see vignettes.","code":"rev(s) #> [1] \"gnirts\" sort(s) #> [1] \"ginrst\" s[3] #> [1] \"r\" count(chars(\"strawberry\"), \"r\") #> [1] 3"},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine chars Objects — c.chars","title":"Combine chars Objects — c.chars","text":"Combine chars Objects","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine chars Objects — c.chars","text":"","code":"# S3 method for class 'chars' c(...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine chars Objects — c.chars","text":"... chars objects.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine chars Objects — c.chars","text":"larger chars object containing combined elements ....","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/c.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine chars Objects — c.chars","text":"","code":"c(chars(\"java\"), chars(\"script\")) #> [1] \"javascript\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/charcuterie-package.html","id":null,"dir":"Reference","previous_headings":"","what":"charcuterie: Handle Strings as Vectors of Characters — charcuterie-package","title":"charcuterie: Handle Strings as Vectors of Characters — charcuterie-package","text":"Creates new chars class looks like string actually vector individual characters, making 'strings' iterable. class enables vector operations 'strings' reverse, sort, head, set operations.","code":""},{"path":[]},{"path":"https://jonocarroll.github.io/charcuterie/reference/charcuterie-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"charcuterie: Handle Strings as Vectors of Characters — charcuterie-package","text":"Maintainer: Jonathan Carroll rpkg@jcarroll.com.au (ORCID)","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a chars Object From a String — chars.character","title":"Create a chars Object From a String — chars.character","text":"Create chars Object String","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a chars Object From a String — chars.character","text":"","code":"# S3 method for class 'character' chars(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a chars Object From a String — chars.character","text":"x string convert chars object (length 1 ). ... unused","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a chars Object From a String — chars.character","text":"object class chars, essentially splitting string individual characters","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.character.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a chars Object From a String — chars.character","text":"chars expects single string input. create list , consider lapply(strings, chars)","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.default.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an Object to chars — chars.default","title":"Convert an Object to chars — chars.default","text":"Convert Object chars","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.default.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an Object to chars — chars.default","text":"","code":"# Default S3 method chars(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.default.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an Object to chars — chars.default","text":"x object convert ... options","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.default.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert an Object to chars — chars.default","text":".NotYetImplemented() error","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a chars Object — chars","title":"Create a chars Object — chars","text":"Create chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a chars Object — chars","text":"","code":"chars(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a chars Object — chars","text":"x object convert chars. ... options passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a chars Object — chars","text":"object class chars.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":null,"dir":"Reference","previous_headings":"","what":"Count Characters in a Chars Object — count","title":"Count Characters in a Chars Object — count","text":"Count Characters Chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count Characters in a Chars Object — count","text":"","code":"count(x, value, ignore.case = FALSE)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count Characters in a Chars Object — count","text":"x vector characters. value character (length 1) count ignore.case letter case ignored?","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count Characters in a Chars Object — count","text":"integer, count instances value x","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/count.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count Characters in a Chars Object — count","text":"","code":"count(chars(\"strawberry\"), 3) #> [1] 0"},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":null,"dir":"Reference","previous_headings":"","what":"Elements of x Except Those in y — except","title":"Elements of x Except Those in y — except","text":"treat operation set.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Elements of x Except Those in y — except","text":"","code":"except(x, y)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Elements of x Except Those in y — except","text":"x larger vector. y smaller vector.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Elements of x Except Those in y — except","text":"elements x appearing y.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/except.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Elements of x Except Those in y — except","text":"","code":"except(c(1:5), 3) #> [1] 1 2 4 5 except(chars(\"abcde\"), \"c\") #> [1] \"abde\" except(chars(\"abracadabra\"), \"b\") #> [1] \"aracadara\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/format.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a chars Object — format.chars","title":"Format a chars Object — format.chars","text":"Format chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/format.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a chars Object — format.chars","text":"","code":"# S3 method for class 'chars' format(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/format.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a chars Object — format.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/format.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format a chars Object — format.chars","text":"formatted chars object.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the First Parts of a chars Object — head.chars","title":"Return the First Parts of a chars Object — head.chars","text":"Return First Parts chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the First Parts of a chars Object — head.chars","text":"","code":"# S3 method for class 'chars' head(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the First Parts of a chars Object — head.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the First Parts of a chars Object — head.chars","text":"first (n) elements chars object chars object.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/head.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return the First Parts of a chars Object — head.chars","text":"","code":"head(chars(\"abcdefhgi\")) #> [1] \"abcdef\" head(chars(\"javascript\"), 4) #> [1] \"java\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Setwise Intersection of chars Objects — intersect.chars","title":"Setwise Intersection of chars Objects — intersect.chars","text":"Setwise Intersection chars Objects","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setwise Intersection of chars Objects — intersect.chars","text":"","code":"# S3 method for class 'chars' intersect(x, y, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setwise Intersection of chars Objects — intersect.chars","text":"x chars object. y chars object character vector. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Setwise Intersection of chars Objects — intersect.chars","text":"setwise intersection x y.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/intersect.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Setwise Intersection of chars Objects — intersect.chars","text":"","code":"union(chars(\"pine\"), chars(\"apple\")) #> [1] \"pineal\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Character a Letter OR a Number? — is_alnum","title":"Is a Character a Letter OR a Number? — is_alnum","text":"combination is_letter() is_number().","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Character a Letter OR a Number? — is_alnum","text":"","code":"is_alnum(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Character a Letter OR a Number? — is_alnum","text":"x vector characters.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Character a Letter OR a Number? — is_alnum","text":"boolean vector indicating whether element x letter number.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_alnum.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Character a Letter OR a Number? — is_alnum","text":"","code":"is_alnum(chars(\"Lee7c0deR 4 L1fe\")) #> L e e 7 c 0 d e R 4 L #> TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE #> 1 f e #> TRUE TRUE TRUE Filter(is_alnum, chars(\"2 B or !2 B\")) #> [1] \"2Bor2B\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Character a Letter? — is_letter","title":"Is a Character a Letter? — is_letter","text":"Compares values letters (English alphabet), ignoring case.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Character a Letter? — is_letter","text":"","code":"is_letter(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Character a Letter? — is_letter","text":"x vector characters.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Character a Letter? — is_letter","text":"boolean vector indicating whether element x letter (appears letters ignoring case).","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_letter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Character a Letter? — is_letter","text":"","code":"is_letter(chars(\"Lee7c0deR\")) #> L e e 7 c 0 d e R #> TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE Filter(is_letter, chars(\"w00t\")) #> [1] \"wt\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Character a Number? — is_number","title":"Is a Character a Number? — is_number","text":"Compares values 0:9 (number).","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Character a Number? — is_number","text":"","code":"is_number(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Character a Number? — is_number","text":"x vector characters.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Character a Number? — is_number","text":"boolean vector indicating whether element x number (appears 0:9 number)","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_number.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Character a Number? — is_number","text":"","code":"is_number(chars(\"Lee7c0deR\")) #> L e e 7 c 0 d e R #> FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE Filter(is_number, chars(\"w00t\")) #> [1] \"00\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Character Punctuation? — is_punct","title":"Is a Character Punctuation? — is_punct","text":"Compares regex group [[:punct:]].","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Character Punctuation? — is_punct","text":"","code":"is_punct(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Character Punctuation? — is_punct","text":"x vector characters.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Character Punctuation? — is_punct","text":"boolean vector indicating whether element x considered punctuation.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/is_punct.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Character Punctuation? — is_punct","text":"","code":"is_punct(chars(\"I can haz?\")) #> I c a n h a z ? #> FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE Filter(Negate(is_punct), chars(\"abc,123;$*%?\")) #> [1] \"abc123\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/print.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a chars Object — print.chars","title":"Print a chars Object — print.chars","text":"Print chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/print.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a chars Object — print.chars","text":"","code":"# S3 method for class 'chars' print(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/print.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a chars Object — print.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/print.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a chars Object — print.chars","text":"x (invisibly), used print console.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. generics intersect, setdiff, union","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Reverse Elements of a chars Object — rev.chars","title":"Reverse Elements of a chars Object — rev.chars","text":"Reverse Elements chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reverse Elements of a chars Object — rev.chars","text":"","code":"# S3 method for class 'chars' rev(x)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reverse Elements of a chars Object — rev.chars","text":"x chars object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reverse Elements of a chars Object — rev.chars","text":"chars object elements reversed.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/rev.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reverse Elements of a chars Object — rev.chars","text":"","code":"rev(chars(\"racecar\")) #> [1] \"racecar\" rev(chars(\"alphabet\")) #> [1] \"tebahpla\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Setwise Difference Between chars Objects — setdiff.chars","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"Setwise Difference chars Objects","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"","code":"# S3 method for class 'chars' setdiff(x, y, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"x chars object. y chars object character vector. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"setwise difference x y.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/setdiff.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Setwise Difference Between chars Objects — setdiff.chars","text":"","code":"setdiff(chars(\"javascript\"), chars(\"script\")) #> [1] \"jav\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Sort a chars Object — sort.chars","title":"Sort a chars Object — sort.chars","text":"Sort chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sort a chars Object — sort.chars","text":"","code":"# S3 method for class 'chars' sort(x, decreasing = FALSE, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sort a chars Object — sort.chars","text":"x chars object. decreasing logical. sort increasing decreasing? available partial sorting. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sort a chars Object — sort.chars","text":"sorted chars object.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sort.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sort a chars Object — sort.chars","text":"","code":"sort(chars(\"alphabet\")) #> [1] \"aabehlpt\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/string.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a String From a chars Object — string","title":"Create a String From a chars Object — string","text":"Create String chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a String From a chars Object — string","text":"","code":"string(x, collapse = \"\", ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a String From a chars Object — string","text":"x one chars objects. collapse optional character string separate results. NA_character_. ... arguments passed paste()","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a String From a chars Object — string","text":"character (traditional R string) elements x single value.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract or Replace Parts of a chars Object — [.chars","title":"Extract or Replace Parts of a chars Object — [.chars","text":"Extract Replace Parts chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract or Replace Parts of a chars Object — [.chars","text":"","code":"# S3 method for class 'chars' x[...]"},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract or Replace Parts of a chars Object — [.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract or Replace Parts of a chars Object — [.chars","text":"extracted parts chars object, chars object replacements performed.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/sub-.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract or Replace Parts of a chars Object — [.chars","text":"","code":"s <- chars(\"censor\") s[2:5] #> [1] \"enso\" s[2:5] <- \"X\" s #> [1] \"cXXXXr\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the Last Parts of a chars Object — tail.chars","title":"Return the Last Parts of a chars Object — tail.chars","text":"Return Last Parts chars Object","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the Last Parts of a chars Object — tail.chars","text":"","code":"# S3 method for class 'chars' tail(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the Last Parts of a chars Object — tail.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return the Last Parts of a chars Object — tail.chars","text":"last (n) elements chars object chars object.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/tail.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Return the Last Parts of a chars Object — tail.chars","text":"","code":"tail(chars(\"javascript\")) #> [1] \"script\" tail(chars(\"abcdefghi\")) #> [1] \"defghi\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Setwise Union of chars Objects — union.chars","title":"Setwise Union of chars Objects — union.chars","text":"Setwise Union chars Objects","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setwise Union of chars Objects — union.chars","text":"","code":"# S3 method for class 'chars' union(x, y, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setwise Union of chars Objects — union.chars","text":"x chars object. y chars object character vector. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Setwise Union of chars Objects — union.chars","text":"setwise union x y.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/union.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Setwise Union of chars Objects — union.chars","text":"","code":"union(chars(\"java\"), chars(\"script\")) #> [1] \"javscript\""},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Unique Elements of chars Objects. — unique.chars","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"Extract Unique Elements chars Objects.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"","code":"# S3 method for class 'chars' unique(x, ...)"},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"x chars object. ... arguments passed methods.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"chars object containing unique elements.","code":""},{"path":"https://jonocarroll.github.io/charcuterie/reference/unique.chars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Unique Elements of chars Objects. — unique.chars","text":"","code":"unique(chars(\"mississippi\")) #> [1] \"misp\""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-006","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.6","title":"charcuterie 0.0.6","text":"added explicit {vctrs} dependency (needed testthat::expect_vector())","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-005","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.5","title":"charcuterie 0.0.5","text":"added count(); “strawberry” 3 ’r’s","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-004","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.4","title":"charcuterie 0.0.4","text":"CRAN release: 2024-09-13 fix CRAN error vignette image added is_number(), is_letter(), is_alnum(), is_punct()","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-003","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.3","title":"charcuterie 0.0.3","text":"CRAN release: 2024-09-10 reworked documentation updated interface string","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-002","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.2","title":"charcuterie 0.0.2","text":"use {generics} setdiff, union, intersect generics - thanks @DavisVaughan","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-001","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.1","title":"charcuterie 0.0.1","text":"refactored internals - thanks @barryrowlingson","code":""},{"path":"https://jonocarroll.github.io/charcuterie/news/index.html","id":"charcuterie-0009000","dir":"Changelog","previous_headings":"","what":"charcuterie 0.0.0.9000","title":"charcuterie 0.0.0.9000","text":"Initial version","code":""}]