packageskeleton
A GitHub repository featuring a starter template for R package development, paired with a Quarto-powered website.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.1%) to scientific vocabulary
Keywords
Repository
A GitHub repository featuring a starter template for R package development, paired with a Quarto-powered website.
Basic Info
- Host: GitHub
- Owner: CenterForAssessment
- License: other
- Language: HTML
- Default Branch: main
- Homepage: https://centerforassessment.github.io/packageSkeleton/
- Size: 21.9 MB
Statistics
- Stars: 0
- Watchers: 4
- Forks: 5
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
packageSkeleton
Overview
The packageSkeleton repository provides a comprehensive, production-ready template for creating professional R packages with integrated Quarto documentation websites. This skeleton eliminates the complexity of package setup by providing a fully configured development environment that includes automated testing, continuous integration, and professional documentation hostingall ready to deploy on GitHub.
Transform your R scripts and workflows into a professional, shareable package in minutes rather than hours. Whether you're consolidating personal utilities, creating tools for your team, or contributing to the open-source community, this skeleton provides everything you need to get started immediately.
Quick Start
- Use this template: Click "Use this template" on GitHub or clone this repository
- Rename: Replace "packageSkeleton" with your package name throughout the project
- Customize: Add your functions to
R/, updateDESCRIPTION, and modify documentation - Deploy: Push to GitHub - your package website will automatically deploy via GitHub Pages
Detailed Setup Guide | Live Example
What's Included
This skeleton provides a complete R package infrastructure:
Core Package Structure
packageSkeleton/
R/ # Your R functions
man/ # Auto-generated documentation
vignettes/ # Package tutorials and examples
tests/ # Automated testing framework
data/ # Package datasets
DESCRIPTION # Package metadata
NAMESPACE # Package namespace (auto-managed)
LICENSE.md # License information
Documentation & Website
_quarto.yml # Website configuration
index.qmd # Homepage content
articles/ # Vignettes and tutorials
reference/ # Function documentation
.github/workflows/ # Automated deployment
Development Tools
- Automated Testing: Pre-configured
testthatframework - CI/CD Pipeline: GitHub Actions for testing and deployment
- Code Coverage: Integrated coverage reporting
- Documentation: Automatic function documentation with
roxygen2 - Website Hosting: Automated Quarto website deployment to GitHub Pages
- Package Checks: Comprehensive R CMD CHECK validation
Key Features
- Zero-Configuration Setup: Clone and start developing immediately
- Automated Documentation: Functions documented with roxygen2 are automatically included in your website
- Professional Styling: Clean, responsive Quarto website with modern design
- Continuous Integration: Automated testing on multiple R versions and operating systems
- Easy Customization: Modular structure allows easy modification of any component
- Version Control: Git-ready with appropriate
.gitignoreand configuration files - Cross-Platform: Works seamlessly on Windows, macOS, and Linux
Perfect For
Data Scientists & Analysts
- Personal Utility Libraries: Consolidate your frequently-used data cleaning, visualization, and analysis functions
- Workflow Automation: Package repetitive tasks into reusable functions with professional documentation
- Team Collaboration: Share standardized tools and methodologies across your organization
R Developers
- Package Prototyping: Quickly test and iterate on package ideas with full infrastructure
- Best Practices: Learn modern R package development through a well-structured example
- Portfolio Projects: Create professional showcases of your R capabilities
Educators & Researchers
- Course Materials: Package datasets, functions, and tutorials for students
- Research Tools: Share reproducible analysis tools with the scientific community
- Workshop Resources: Provide participants with ready-to-use packages and documentation
Installation & Setup
Prerequisites
- R ( 4.0.0) and RStudio (recommended)
- Git for version control
- GitHub account for hosting and collaboration
- Basic familiarity with R package structure
Essential R Packages
Install these packages to fully utilize the skeleton: ```r
Core development tools
install.packages(c("devtools", "usethis", "roxygen2", "testthat"))
Documentation and website
install.packages(c("quarto", "pkgdown")) ```
Setup Steps
Create your repository:
- Click "Use this template" on the GitHub repository page
- Name your new repository (e.g., "myAwesomePackage")
- Clone to your local machine
Customize the package: ```r
In RStudio, open the project and run:
usethis::use_description(fields = list( Title = "Your Package Title", Description = "What your package does",
Authors@R= "Your Name email@example.com [aut, cre]" )) ```Add your content:
- Place R functions in
R/directory - Add datasets to
data/directory - Create vignettes in
vignettes/directory - Write tests in
tests/testthat/directory
- Place R functions in
Build and check: ```r
Document functions and build package
devtools::document() devtools::check()
# Build website locally quarto::quarto_render() ```
- Deploy:
- Push changes to GitHub
- Enable GitHub Pages in repository settings
- Your website will be available at
https://yourusername.github.io/yourpackage
Content Ideas
Transform your R work into a professional package:
Data Manipulation Tools
```r
Example: Custom data cleaning functions
cleansurveydata <- function(df, remove_incomplete = TRUE) { # Your data cleaning logic here } ```
Analysis Wrappers
```r
Example: Simplified statistical analysis
quick_regression <- function(data, outcome, predictors) { # Wrapper for common regression tasks } ```
Visualization Functions
```r
Example: Themed plotting functions
theme_publication <- function() { # Custom ggplot2 theme for publications } ```
Domain-Specific Tools
- Finance: Portfolio analysis, risk calculations
- Education: Assessment scoring, growth modeling
- Healthcare: Clinical data processing, outcome analysis
- Marketing: Customer segmentation, campaign analysis
Advanced Features
Automated Testing
The skeleton includes a comprehensive testing framework: ```r
Example test structure in tests/testthat/
testthat("myfunction works correctly", { expectequal(myfunction(2, 3), 5) expecterror(myfunction("a", "b")) }) ```
Custom Documentation
Leverage roxygen2 for professional documentation: ```r
' Calculate Summary Statistics
'
' This function calculates descriptive statistics for a numeric vector.
'
' @param x A numeric vector
' @param na.rm Logical, should NA values be removed?
' @return A list of summary statistics
' @examples
' calc_summary(c(1, 2, 3, 4, 5))
' @export
calc_summary <- function(x, na.rm = TRUE) { # Function implementation } ```
Website Customization
Modify _quarto.yml to customize your site:
yaml
website:
title: "Your Package Name"
navbar:
left:
- text: "Home"
file: index.qmd
- text: "Reference"
file: reference/index.qmd
Why Create an R Package?
Creating an R package isn't just for CRAN submissionsit's about building better tools for yourself and your team:
- Efficiency: Stop copying functions between projects
- Documentation: Force yourself to document your work properly
- Testing: Ensure your functions work correctly across different scenarios
- Sharing: Easily distribute your tools to colleagues and collaborators
- Portfolio: Demonstrate your R skills professionally
- Learning: Master R package development best practices
Learning Resources
- Complete Setup Guide: Step-by-step instructions
- R Packages Book: Comprehensive guide by Hadley Wickham
- Quarto Documentation: Learn to customize your website
- GitHub Actions: Understand the CI/CD pipeline
Support & Contributing
- Issues: Report bugs or request features via GitHub Issues
- Discussions: Ask questions and share ideas in GitHub Discussions
- Contributing: Pull requests welcome! See
CONTRIBUTING.mdfor guidelines - Community: Join the broader R package development community
Ready to start building? Use this template and create your first R package today!
Produced with love by:
Owner
- Name: Center for Assessment
- Login: CenterForAssessment
- Kind: organization
- Email: support@nciea.org
- Location: Dover, New Hampshire
- Website: www.nciea.org
- Twitter: NCIEA1
- Repositories: 53
- Profile: https://github.com/CenterForAssessment
National Center for the Improvement of Educational Assessment
GitHub Events
Total
- Push event: 30
- Pull request review event: 1
- Pull request event: 62
- Fork event: 2
Last Year
- Push event: 30
- Pull request review event: 1
- Pull request event: 62
- Fork event: 2
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 22
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 22
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 22
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 22
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- dbetebenner (42)
- erwx (2)
- ndadey (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/cache v3 composite
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- R >= 4.0 depends
- crayon * imports
- testthat * imports
- toOrdinal * imports
- knitr * suggests
- rmarkdown * suggests