Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

SidhuK/kickstartR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

kickstartR kickstartR logo

R-CMD-check CRAN status Lifecycle: experimental

Stop wasting time setting up projects. Start analyzing.

kickstartR creates production-ready R project structures in seconds. Choose from 5 templates, add renv for dependencies, targets for pipelines, and automatic LICENSE files - all with a single function call.


Why kickstartR?

Without kickstartR With kickstartR
Manually create 10+ folders One command creates everything
Copy .gitignore from old projects Best-practice .gitignore included
Forget to set up renv include_renv = TRUE and done
Inconsistent project structures Same structure, every time

Installation

# Install from GitHub
devtools::install_github("sidhuk/kickstartR")

Quick Start

30 Seconds to Your First Project

library(kickstartR)

# That's it. You're ready to analyze.
initialize_project("my_analysis")

Or Use the Interactive Wizard

# Guided setup - perfect for beginners
initialize_project_interactive()
=== kickstartR Project Setup Wizard ===

Project name: sales_analysis
Template [1-5]: 2 (analysis)
Author: Jane Doe
License: MIT
Initialize renv? y
Initialize git? y

Project created successfully!

Templates

Choose the right structure for your work:

Template Best For Command
basic General data analysis template = "basic"
analysis Full research projects template = "analysis"
shiny Web applications template = "shiny"
targets Reproducible pipelines template = "targets"
minimal Quick scripts template = "minimal"
# See all templates with descriptions
available_templates(verbose = TRUE)

Template Structures

basic - Standard Data Analysis
MyProject/
β”œβ”€β”€ 01_data/
β”‚   β”œβ”€β”€ 01_raw/
β”‚   β”œβ”€β”€ 02_processed/
β”‚   └── 03_external/
β”œβ”€β”€ 02_scripts/
β”‚   └── 00_main_script.R
β”œβ”€β”€ 03_output/
β”‚   β”œβ”€β”€ 01_figures/
β”‚   β”œβ”€β”€ 02_tables/
β”‚   └── 03_reports_rendered/
β”œβ”€β”€ 04_models/
β”œβ”€β”€ 05_notebooks/
β”œβ”€β”€ README.md
β”œβ”€β”€ .gitignore
└── MyProject.Rproj
shiny - Web Application
MyShinyApp/
β”œβ”€β”€ app.R
β”œβ”€β”€ R/
β”‚   β”œβ”€β”€ ui.R
β”‚   └── server.R
β”œβ”€β”€ www/
β”‚   β”œβ”€β”€ css/
β”‚   └── js/
β”œβ”€β”€ data/
β”œβ”€β”€ README.md
└── MyShinyApp.Rproj
targets - Reproducible Pipeline
MyPipeline/
β”œβ”€β”€ _targets.R
β”œβ”€β”€ R/
β”‚   └── functions.R
β”œβ”€β”€ 01_data/
β”‚   β”œβ”€β”€ 01_raw/
β”‚   └── 02_processed/
β”œβ”€β”€ 03_output/
β”œβ”€β”€ README.md
└── MyPipeline.Rproj

Features

renv Integration

Lock your dependencies for reproducibility:

initialize_project("reproducible_analysis", include_renv = TRUE)

# Creates renv.lock and renv/ folder automatically
# Other users can restore with: renv::restore()

targets Pipeline Support

Build make-like pipelines for complex analyses:

initialize_project("data_pipeline", template = "targets")

# Or add to any template:
initialize_project("my_project", include_targets = TRUE)

Automatic License Generation

initialize_project("open_source_project", license = "MIT", author = "Jane Doe")

# Available: MIT, GPL-3, GPL-2, CC-BY-4.0, CC0
available_licenses()

Post-Creation Actions

initialize_project(
  "quick_start",
  git_init = TRUE,      # Initialize git repository
  open_project = TRUE,  # Open in RStudio immediately
  open_readme = TRUE    # Start editing README right away
)

Custom Directories

initialize_project(
  "custom_project",
  custom_dirs = c("06_presentations", "07_literature", "08_admin"),
  gitignore_extras = c("*.docx", "private/")
)

Full Example

library(kickstartR)

# Create a fully-featured research project
initialize_project(
  project_name = "climate_analysis_2024",
  path = "~/Projects",
  template = "analysis",
  author = "Dr. Jane Smith",
  license = "CC-BY-4.0",
  include_renv = TRUE,
  include_targets = TRUE,
  git_init = TRUE,
  custom_dirs = c("06_presentations", "07_literature"),
  open_project = TRUE
)

Result:

Creating project: climate_analysis_2024
Created 2 custom directories
Added targets pipeline support
Created LICENSE file (CC-BY-4.0)
Initialized renv
Initialized git repository

Project 'climate_analysis_2024' created successfully!
Location: /Users/jane/Projects/climate_analysis_2024

Team Configuration

Set defaults for your whole team with .kickstartR.yml:

# Create a config template
create_config(global = TRUE)  # In home directory
# ~/.kickstartR.yml
defaults:
  template: analysis
  include_renv: true
  license: MIT
  git_init: true

author:
  name: "Data Science Team"
  email: "[email protected]"

custom_dirs:
  - "06_documentation"

Function Reference

Function Description
initialize_project() Create a new project with specified options
initialize_project_interactive() Guided wizard for project creation
available_templates() List available project templates
available_licenses() List available license types
create_config() Create a .kickstartR.yml config file

Recommended Workflow

graph LR
    A[kickstartR] --> B[Project Created]
    B --> C[Open .Rproj]
    C --> D[Add Raw Data]
    D --> E[Write Scripts]
    E --> F[Run Analysis]
    F --> G[Commit to Git]
Loading
  1. Create: initialize_project("my_project", include_renv = TRUE)
  2. Open: Double-click the .Rproj file
  3. Add data: Place files in 01_data/01_raw/
  4. Analyze: Edit scripts in 02_scripts/
  5. Output: Save results to 03_output/
  6. Share: Push to GitHub with confidence

Works Great With

Package Integration
renv include_renv = TRUE
targets template = "targets" or include_targets = TRUE
here .here file created automatically
usethis Complementary project setup tools

Contributing

We welcome contributions! Please feel free to:

  • Report bugs via GitHub Issues
  • Suggest features or new templates
  • Submit pull requests

License

MIT License - see LICENSE for details.


Made with passion for the R community
GitHub Β· Documentation

About

Create Project Boilerplate Structures for R Analysis Projects in seconds πŸš€

Topics

Resources

License

Stars

Watchers

Forks