Skip to content
Coming soon: Ally. Your guide to the world of AI and R. Learn More →
R for the Rest of Us Logo

Data Cleaning with R

Letter Case

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

Import the Marine Protected Areas dataset (MPAS-your.csv), and summarize the number of Marine Protected Areas by country (Country full).

Learn More

To learn more about the to_any_case() function used in this lesson, check out the snakecase package.

The video below is also an interesting look at how most people in the R world (in 2017) name things.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Tobia Dondè

Tobia Dondè • March 31, 2026

If a tidyverse-oriented approach is chosen it is worth noting that stringr (which is loaded in the tidyverse meta-package since 2017-11-07) added functions to change cases much like the snakecase package:

  • str_to_camel(), str_to_snake(), and str_to_kebab() were added in version 1.6.0 (2025-11-04)
  • str_to_sentence() was added in version 1.4.0 (2019-02-10)
  • str_to_upper(), str_to_lower(), and str_to_title() seem to always have been there.

See the stringr changelog page: https://stringr.tidyverse.org/news/index.html