#Day17 | Relationships – Remake | #30DayChartChallenge | Are we making more or fewer remakes as the years go by?. Built with #RStats using #rvest, #dplyr, #stringr, #ggplot2 and #showtext.
#Day12 | Distributions – FlowingData – ThemeDay | #30DayChartChallenge | Heat Spots in Central America 2020-2024, source: NASA Firms . Built with #RStats using #ggplot2, #dplyr, #readr, #stringr and scales.
#Día4 | Comparaciones – Slope | #30DayChartChallenge. Comportamiento de los focos de calor detectados para los paises de América Central. Creada usando R con #ggplot2, #dplyr, #scales, #readr, #stringr y #ggtext.
#Día3 | Comparación– Mosaico | #30DayChartChallenge. Focos de calor detectados para los paises de América Central. Un gráfico con valores absolutos y otro con valores relativos. Creada usando R con #ggplot2, #treemapify, #dplyr, #scales, #readr y #stringr.

Question to #rstats enthusiasts: How are you dealing with NAs when using #str_detect?

str_detect(NA, regex("hello")) results in NA. This is expected behavior and I think I get the reasoning behind it.

In 99 % of my usecases though, I would like to have a FALSE as a result. Hence I need everytime an additional step to convert NAs to FALSE. I find this combersome.

I was wondering how others are dealing with such cases. Sometimes I think a pertaining option in #stringr would be nice....

This is a noob's observation of R, Tidyverse and Stringr. But wow, why can some datasets open in notepad or Windows file preview or excel in 1 second but takes minutes or hours to show up in str_view_all?

#R, #Tidyverse, #Stringr

The {stringr} #rstats 📦 gets a function to convert a character vector into a single, comma-separated string *with custom wording before the last item.* (I've been using knits::combine_words() for that.)

Example from the tidyverse blog post about stringr 1.5.0:

str_flatten_comma(c("cats", "dogs", "mice"), last = ", and ")

#> [1] "cats, dogs, and mice"

https://www.tidyverse.org/blog/2022/12/stringr-1-5-0/

#OxfordComma #tidyverse #stringr

stringr 1.5.0

It's been a long three years but a new version of stringr is now on CRAN! This release includes a bunch of small but useful new functions and some increased consistency with the rest of the tidyverse.