A new AWS account is granted, by default, root privileges. That means it has access to everything. Best practices dictate we avoid using root privileges whenever possible. Create and log into AWS with an Administrator user account instead of root.
A function with a data.frame column parameter can’t evaluate the column argument until it is first ‘quoted’, followed by an ‘unquote’ within the dyplr function. ‘Quote’ a column using enquo(), then ‘unquote’ it using !!.
A little white space between R Markdown sections gives the reader a little pause in the story before changing the subject otherwise all the cells get smooshed together by default and it ends up looking like one long run-on sentence.
To emphasize value differences in a bar chart, using gradient colors is a nice option. ggplot makes it easy with scale_fill_gradient2().
Writing data to a file using write.csv failes to retain column data types. A better way to save/restore data objects to/from files is by using RDS and RData.
Instead of a cumbersomely nested ifelse statement, use dplyr’s mutate and case_when functions instead.