diff --git a/_freeze/html/strings/execute-results/html.json b/_freeze/html/strings/execute-results/html.json
index 4b33ceb8..6df85258 100644
--- a/_freeze/html/strings/execute-results/html.json
+++ b/_freeze/html/strings/execute-results/html.json
@@ -1,7 +1,8 @@
{
- "hash": "fd17170df9e3d847b87aa6127d940857",
+ "hash": "35c0bcda724eb95fdf834959da26b260",
"result": {
- "markdown": "---\ntitle: \"String manipulation with stringr :: Cheatsheet\"\ndescription: \" \"\nimage-alt: \"\"\nexecute:\n eval: true\n output: false\n warning: false\n---\n\n::: {.cell .column-margin}\n\n Download PDF
\n
Translations (PDF)
\n* Spanish\n* Vietnamese\n:::\n\n\n\n\nThe **stringr** package provides a set of internally consistent tools for working with character strings, i.e. sequences of characters surrounded by quotation marks.\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(stringr)\n```\n:::\n\n\n\n\n## Detect Matches\n\n- `str_detect(string, pattern, negate = FALSE)`: Detect the presence of a pattern match in a string.\n Also `str_like()`.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str(fruit, \"a\")\n ```\n :::\n\n\n- `str_starts(string, pattern, negate = FALSE)`: Detect the presence of a pattern match at the beginning of a string.\n Also `str_ends()`.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_starts(fruit, \"a\")\n ```\n :::\n\n\n- `str_which(string, pattern, negate = FALSE)`: Find the indexes of strings that contain a pattern match.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_which(fruit, \"a\")\n ```\n :::\n\n\n- `str_locate(string, pattern)`: Locate the positions of pattern matches in a string.\n Also `str_locate_all()`.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_locate(fruit, \"a\")\n ```\n :::\n\n\n- `str_count(string, pattern)`: Count the number of matches in a string.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_count(fruit, \"a\")\n ```\n :::\n\n\n## Mutate Strings\n\n- `str_sub() <- value`: Replace substrings by identifying the substrings with `str_sub()` and assigning into the results.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_sub(fruit, 1, 3) <- \"str\"\n ```\n :::\n\n\n- `str_replace(string, pattern, replacement)`: Replace the first matched pattern in each string.\n Also `str_remove()`.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_replace(fruit, \"p\", \"-\")\n ```\n :::\n\n\n- `str_replace_all(string, pattern, replacement)`: Replace all matched patterns in each string.\n Also `str_remove_all()`.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_replace_all(fruit, \"p\", \"-\")\n ```\n :::\n\n\n- `str_to_lower(string, locale = \"en\")`^1^: Convert strings to lower case.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_to_lower(sentences)\n ```\n :::\n\n\n- `str_to_upper(string, locale = \"en\")`^1^: Convert strings to upper case.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_to_upper(sentences)\n ```\n :::\n\n\n- `str_to_title(string, locale = \"en\")`^1^: Convert strings to title case.\n Also `str_to_setence()`.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_to_title(sentences)\n ```\n :::\n\n\n## Subset Strings\n\n- `str_sub(string, start = 1L, end = -1L)`: Extract substrings from a character vector.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_sub(fruit, 1, 3)\n str_sub(fruit, -2)\n ```\n :::\n\n\n- `str_subset(string, pattern, negate = FALSE)`: Return only the strings that contain a pattern match.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_subset(fruit, \"p\")\n ```\n :::\n\n\n- `str_extract(string, pattern)`: Return the first pattern match found in each string, as a vector.\n Also `str_extract_all()` to return every pattern match.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_extract(fruit, \"[aeiou]\")\n ```\n :::\n\n\n- `str_match(string, pattern)`: Return the first pattern match found in each string, as a matrix with a column for each ( ) group in pattern.\n Also `str_match_all()`.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_match(sentences, \"(a|the) ([^ +])\")\n ```\n :::\n\n\n## Join and Split\n\n- `str_c(..., sep = \"\", collapse = NULL)`: Join multiple strings into a single string.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_c(letters, LETTERS)\n ```\n :::\n\n\n- `str_flatten(string, collapse = \"\")`: Combines into a single string, separated by collapse.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_flatten(fruit, \", \")\n ```\n :::\n\n\n- `str_dup(string, times)`: Repeat strings times times.\n Also `str_unique()` to remove duplicates.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_dup(fruit, times = 2)\n ```\n :::\n\n\n- `str_split_fixed(string, pattern, n)`: Split a vector of strings into a matrix of substrings (splitting at occurrences of a pattern match).\n Also `str_split()` to return a list of substrings and `str_split_n()` to return the nth substring.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_split_fixed(sentences, \" \", n = 3)\n ```\n :::\n\n\n- `str_glue(..., .sep = \"\", .envir = parent.frame())`: Create a string from strings and {expressions} to evaluate.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_glue(\"Pi is {pi}\")\n ```\n :::\n\n\n- `str_glue_data(.x, ..., .sep = \"\", .envir = parent.frame(), .na = \"NA\")`: Use a data frame, list, or environment to create a string from strings and {expressions} to evaluate.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_glue_data(mtcars, \"{rownames(mtcars)} has {hp} hp\")\n ```\n :::\n\n\n## Manage Lengths\n\n- `str_length(string)`: The width of strings (i.e. number of code points, which generally equals the number of characters).\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_length(fruit)\n ```\n :::\n\n\n- `str_pad(string, width, side = c(\"left\", \"right\", \"both\"), pad = \" \")`: Pad strings to constant width.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_pad(fruit, 17)\n ```\n :::\n\n\n- `str_trunc(string, width, side = c(\"left\", \"right\", \"both\"), ellipsis = \"...\")`: Truncate the width of strings, replacing content with ellipsis.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_trunc(sentences, 6)\n ```\n :::\n\n\n- `str_trim(string, side = c(\"left\", \"right\", \"both\"))`: Trim whitespace from the start and/or end of a string.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_trim(str_pad(fruit, 17))\n ```\n :::\n\n\n- `str_squish(string)`: Trim white space from each end and collapse multiple spaces into single spaces.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_squish(str_pad(fruit, 17, \"both\"))\n ```\n :::\n\n\n## Order Strings\n\n- `str_order(x, decreasing = FALSE, na_last = TRUE, locale = \"en\", numeric = FALSE, ...)^1^`: Return the vector of indexes that sorts a character vector.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n fruit[str_order(fruit)]\n ```\n :::\n\n\n- `str_sort(x, decreasing = FALSE, na_last = TRUE, locale = \"en\", numeric = FALSE, ...)^1^`: Sort a character vector.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_sort(fruit)\n ```\n :::\n\n\n## Helpers\n\n- `str_conv(string, encoding)`: Override the encoding of a string.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_conv(fruit, \"ISO-8859-1\")\n ```\n :::\n\n\n- `str_view(string, pattern, match = NA)`: View HTML rendering of all regex matches.\n Also `str_view()` to see only the first match.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_view(sentences, \"[aeiou]\")\n ```\n :::\n\n\n- `str_equal(x, y, locale = \"en\", ignore_case = FALSE, ...)`^1^: Determine if two strings are equivalent.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_equal(c(\"a\", \"b\"), c(\"a\", \"c\"))\n ```\n :::\n\n\n- `str_wrap(string, width = 80, indent = 0, exdent = 0)`: Wrap strings into nicely formatted paragraphs.\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_wrap(sentences, 20)\n ```\n :::\n\n\n^1^ SeeDownload PDF
\n\n\nTranslations (PDF)
\n* Portuguese\n* Spanish\n* Vietnamese\n:::\n\n\n\n\n\nThe **stringr** package provides a set of internally consistent tools for working with character strings, i.e. sequences of characters surrounded by quotation marks.\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(stringr)\n```\n:::\n\n\n\n\n\n## Detect Matches\n\n- `str_detect(string, pattern, negate = FALSE)`: Detect the presence of a pattern match in a string.\n Also `str_like()`.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str(fruit, \"a\")\n ```\n :::\n\n\n\n- `str_starts(string, pattern, negate = FALSE)`: Detect the presence of a pattern match at the beginning of a string.\n Also `str_ends()`.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_starts(fruit, \"a\")\n ```\n :::\n\n\n\n- `str_which(string, pattern, negate = FALSE)`: Find the indexes of strings that contain a pattern match.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_which(fruit, \"a\")\n ```\n :::\n\n\n\n- `str_locate(string, pattern)`: Locate the positions of pattern matches in a string.\n Also `str_locate_all()`.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_locate(fruit, \"a\")\n ```\n :::\n\n\n\n- `str_count(string, pattern)`: Count the number of matches in a string.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_count(fruit, \"a\")\n ```\n :::\n\n\n\n## Mutate Strings\n\n- `str_sub() <- value`: Replace substrings by identifying the substrings with `str_sub()` and assigning into the results.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_sub(fruit, 1, 3) <- \"str\"\n ```\n :::\n\n\n\n- `str_replace(string, pattern, replacement)`: Replace the first matched pattern in each string.\n Also `str_remove()`.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_replace(fruit, \"p\", \"-\")\n ```\n :::\n\n\n\n- `str_replace_all(string, pattern, replacement)`: Replace all matched patterns in each string.\n Also `str_remove_all()`.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_replace_all(fruit, \"p\", \"-\")\n ```\n :::\n\n\n\n- `str_to_lower(string, locale = \"en\")`^1^: Convert strings to lower case.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_to_lower(sentences)\n ```\n :::\n\n\n\n- `str_to_upper(string, locale = \"en\")`^1^: Convert strings to upper case.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_to_upper(sentences)\n ```\n :::\n\n\n\n- `str_to_title(string, locale = \"en\")`^1^: Convert strings to title case.\n Also `str_to_setence()`.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_to_title(sentences)\n ```\n :::\n\n\n\n## Subset Strings\n\n- `str_sub(string, start = 1L, end = -1L)`: Extract substrings from a character vector.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_sub(fruit, 1, 3)\n str_sub(fruit, -2)\n ```\n :::\n\n\n\n- `str_subset(string, pattern, negate = FALSE)`: Return only the strings that contain a pattern match.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_subset(fruit, \"p\")\n ```\n :::\n\n\n\n- `str_extract(string, pattern)`: Return the first pattern match found in each string, as a vector.\n Also `str_extract_all()` to return every pattern match.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_extract(fruit, \"[aeiou]\")\n ```\n :::\n\n\n\n- `str_match(string, pattern)`: Return the first pattern match found in each string, as a matrix with a column for each ( ) group in pattern.\n Also `str_match_all()`.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_match(sentences, \"(a|the) ([^ +])\")\n ```\n :::\n\n\n\n## Join and Split\n\n- `str_c(..., sep = \"\", collapse = NULL)`: Join multiple strings into a single string.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_c(letters, LETTERS)\n ```\n :::\n\n\n\n- `str_flatten(string, collapse = \"\")`: Combines into a single string, separated by collapse.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_flatten(fruit, \", \")\n ```\n :::\n\n\n\n- `str_dup(string, times)`: Repeat strings times times.\n Also `str_unique()` to remove duplicates.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_dup(fruit, times = 2)\n ```\n :::\n\n\n\n- `str_split_fixed(string, pattern, n)`: Split a vector of strings into a matrix of substrings (splitting at occurrences of a pattern match).\n Also `str_split()` to return a list of substrings and `str_split_n()` to return the nth substring.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_split_fixed(sentences, \" \", n = 3)\n ```\n :::\n\n\n\n- `str_glue(..., .sep = \"\", .envir = parent.frame())`: Create a string from strings and {expressions} to evaluate.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_glue(\"Pi is {pi}\")\n ```\n :::\n\n\n\n- `str_glue_data(.x, ..., .sep = \"\", .envir = parent.frame(), .na = \"NA\")`: Use a data frame, list, or environment to create a string from strings and {expressions} to evaluate.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_glue_data(mtcars, \"{rownames(mtcars)} has {hp} hp\")\n ```\n :::\n\n\n\n## Manage Lengths\n\n- `str_length(string)`: The width of strings (i.e. number of code points, which generally equals the number of characters).\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_length(fruit)\n ```\n :::\n\n\n\n- `str_pad(string, width, side = c(\"left\", \"right\", \"both\"), pad = \" \")`: Pad strings to constant width.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_pad(fruit, 17)\n ```\n :::\n\n\n\n- `str_trunc(string, width, side = c(\"left\", \"right\", \"both\"), ellipsis = \"...\")`: Truncate the width of strings, replacing content with ellipsis.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_trunc(sentences, 6)\n ```\n :::\n\n\n\n- `str_trim(string, side = c(\"left\", \"right\", \"both\"))`: Trim whitespace from the start and/or end of a string.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_trim(str_pad(fruit, 17))\n ```\n :::\n\n\n\n- `str_squish(string)`: Trim white space from each end and collapse multiple spaces into single spaces.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_squish(str_pad(fruit, 17, \"both\"))\n ```\n :::\n\n\n\n## Order Strings\n\n- `str_order(x, decreasing = FALSE, na_last = TRUE, locale = \"en\", numeric = FALSE, ...)^1^`: Return the vector of indexes that sorts a character vector.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n fruit[str_order(fruit)]\n ```\n :::\n\n\n\n- `str_sort(x, decreasing = FALSE, na_last = TRUE, locale = \"en\", numeric = FALSE, ...)^1^`: Sort a character vector.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_sort(fruit)\n ```\n :::\n\n\n\n## Helpers\n\n- `str_conv(string, encoding)`: Override the encoding of a string.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_conv(fruit, \"ISO-8859-1\")\n ```\n :::\n\n\n\n- `str_view(string, pattern, match = NA)`: View HTML rendering of all regex matches.\n Also `str_view()` to see only the first match.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_view(sentences, \"[aeiou]\")\n ```\n :::\n\n\n\n- `str_equal(x, y, locale = \"en\", ignore_case = FALSE, ...)`^1^: Determine if two strings are equivalent.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_equal(c(\"a\", \"b\"), c(\"a\", \"c\"))\n ```\n :::\n\n\n\n- `str_wrap(string, width = 80, indent = 0, exdent = 0)`: Wrap strings into nicely formatted paragraphs.\n\n\n\n ::: {.cell}\n \n ```{.r .cell-code}\n str_wrap(sentences, 20)\n ```\n :::\n\n\n\n^1^ See