Menu

From Idea to CRAN: My Journey Building the `splitr` R Package
📰

From Idea to CRAN: My Journey Building the `splitr` R Package

DEV Community·Akan·7 months ago
#hNgMCia5
#programming#cran#package#ai#software
Reading 0:00
15s threshold

If you've ever thought, "I wish R could do X automatically," I have a story for you. Recently, I embarked on a journey to create my first R package — and let me tell you, it was one of the most fun and educational experiences in my coding career.

The goal? Build splitr , a package that splits an Excel sheet into multiple sheets effi ciently, using data.table for speed and openxlsx for Excel magic.

Step 1: The Idea and the Blueprint

It all started with a common pain point: dealing with massive Excel files. Manually splitting data into chunks for reporting or analysis was tedious.

I sketched out the plan:

Read a source Excel sheet

Split rows into n chunks

Write each chunk into a separate sheet in a single workbook

Apply styles and optionally save to disk

Simple, right? But turning that plan into a robust, reusable R function is where the fun begins.

🛠 Step 2: Structuring the Package

Using RStudio , I created a new package project called splitr .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.