Today I Learned: ____


TIL about the strtrim function...used to use substring(1, n)...not a huge savings but cool and semantically easier to think about:

x <- 'Dason is a horrid human being (or bot) devoid of any type of empathy for others.  He has amassed his fortune at the expense of all that is holy and sacred.  He speaks with forked tongues'

paste0(trimws(strtrim(x, 60)), '...')
## [1] "Dason is a horrid human being (or bot) devoid of any type of..."
TIL i use shiny modules. I have a dashboard that has 4 to 5 pages (representing subgroups), and on each page the elements (graphs, text, tables) are all the same. Made for a good use case.

To slightly complicate the matter, I also have a reactive data set powering all the pages (built off a date range filter) and other inputs that go into the calculation of the elements. Took some googling but i figured out how to get them to all play nicely, though I really need to review the code.

My head hurts.
I'm currently going through Text Mining with R: A Tidy Approach by Robinson and Silge. In this book they mention the {sentimentR} package, which is useful for analyzing sentiments on whole sentences (over words, which I've been doing).

I looked into this a bit and I saw it was authored by @trinker !

My genuine reaction: