R Functional Programming: across() and map() for Messy Data
Details
The 45-min hands-on session on cleaning messy datasets in R without copy-paste.
Why you need this: Tired of typing `str_remove_all()` for 20 columns? Have 12 NEPA CSVs with the same messy `bill` column? Learn to write the cleaning rule once and apply it to many columns with `across()` and many files with `map()`.
What you’ll do:
- Write 1 R function to fix `"₦45,000 naira"` → `45000`
- Use `across()` to clean all price columns in `offa_market.csv` at once
- Use `map()` to read + clean 12 monthly IBEDC files and stack them into 1 dataset
Who: Offa-R-Users who know `mutate` and `filter`. Never used `across()` or `map()`? This is for you.
Takeaway: Leave with `clean_naira()` function, team `functions.R` template, and code that cleans next month’s data in 5 lines instead of 5 hours.
No loops. No Excel. Just R.
Related topics
Events in Offa, NG
Data Analytics
Programming in R
Programming Languages
Concurrent Programming
Statistical Computing


