RbeginnercliAI generated

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

  1. 01

    Set up an Rscript with argument parsing

    ~1h

    Use commandArgs to accept an input file path and output file path from the command line.

  2. 02

    Implement whitespace and casing cleanup

    ~1.5h

    Use stringr functions to trim whitespace and standardize text casing across character columns.

  3. 03

    Standardize dates and remove duplicates

    ~2h

    Parse inconsistent date formats into a single standard format and drop exact duplicate rows.

  4. 04

    Write the cleaned file and print a summary

    ~1h

    Save the cleaned data to the output path and print a summary of how many rows/columns were changed.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~5.5h · 4 steps

Tech stack

dplyrstringrreadr