Command-line CSV Cleaner
Build an Rscript-based command-line tool that takes a messy CSV file and applies cleaning rules such as trimming whitespace, standardizing date formats, and removing duplicate rows. Learners practice writing standalone R scripts, argument parsing, and data cleaning with dplyr and stringr.
- Estimate
- ~5.5h
- Steps
- 4
- Completed by
- 0
- Proposed by
- codeseed.app
dplyr · stringr · readr
Project roadmap
- 01
Set up an Rscript with argument parsing
~1hUse commandArgs to accept an input file path and output file path from the command line.
- 02
Implement whitespace and casing cleanup
~1.5hUse stringr functions to trim whitespace and standardize text casing across character columns.
- 03
Standardize dates and remove duplicates
~2hParse inconsistent date formats into a single standard format and drop exact duplicate rows.
- 04
Write the cleaned file and print a summary
~1hSave the cleaned data to the output path and print a summary of how many rows/columns were changed.
Resources
- DocsR Manuals
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack