12 Appendix: Project & R Package
12.1 Group
| Group | Member 1 | Member 2 | Topic |
|---|---|---|---|
| 1 | Akomanyi-Addo, Allswell | Sarpong, Felix | TBA |
| 2 | Zhang, Zilong | TBA | |
| 3 | Stell, Tommy | Computational Statistical Algebraic Topology | |
| 4 | Vu, Ha | Youden Index | |
| 5 | Zhang, Boshu | You, Sifan | TBA |
| 6 | Zhang, Yalin | MC methods on Retirement Planning | |
| 7 | Rehman, Muhammad Aimal | Lu, Zhili | RAG and RAGAS in R |
| 8 | Creary, Maya | Alvarado, Alexus | TBA |
| 9 | Shamshad, Azka | Khadka, Sushil | TBA |
| 10 | Wu, Yunxue | MC methods on Gas Station Queues | |
| 11 | Jinnah, Kalen | TBA | |
| 12 | Krause, Andrew | TBA |
12.2 Format
Due: To be Annouced
Points: [20+10] points
This version: October 16, 2025
12.3 Overview
The final project is a key component of this course, designed to integrate computational thinking, statistical theory, and reproducible research practices. Your goal is to develop an R package that implements a computational or statistical method, document it, and present your work both in a written report and an oral presentation.
This project will give you hands-on experience with:
- Implementing statistical algorithms efficiently in
R, - Packaging reproducible code and documentation,
- Writing professional scientific reports,
- Communicating technical results effectively.
12.4 Project Components
Your submission will consist of three main parts.
12.4.1 1. R Package
You will create an R package that provides a computational or statistical tool. The package should:
- Contain well-documented functions using
roxygen2, - Include example data (if appropriate),
- Provide at least one working vignette demonstrating use cases,
- Include meaningful unit tests (e.g., using
testthat), - Pass
R CMD checkwithout errors.
Possible directions include:
- Implementation of a Monte Carlo or MCMC algorithm,
- Other numerical optimization algorithms or integration routines,
- Resampling methods (bootstrap, permutation tests),
- Dimensionality reduction or regression algorithms,
- Simulation frameworks for a statistical model.
- Other things you find interesting. Come and talk to me before you start.
12.4.2 2. Written Report
The report 8-10 pages should be written in LaTeX and may include but not limited to:
- Motivation and background of your method or problem,
- Description of algorithmic implementation,
- Simulation or data analysis examples,
- Discussion of computational efficiency and accuracy,
- Future extensions or open problems.
Try to look at the R Journal articles for inspiration on structure and style.
12.4.3 3. Presentation
You will give a presentation [Length TBA after everyone finds a team] during the class sessions. Your presentation should:
- Summarize the motivation, method, and results,
- Include a live demo or code walkthrough (optional but encouraged),
- Be clear, concise, and visually well-prepared.
12.5 Collaboration Policy
You may discuss ideas and coding techniques with classmates, but the final package and report must be your own work. All code and text should be written individually or with your groupmate if you decide to team up.
12.6 Submission Instructions
- Submit your package via a public GitHub repository link.
- Upload your report (PDF) and slides to the course submission portal.
- Include installation instructions in the
README.md.
Tip: Start early — the package structure, documentation, and testing usually take longer than expected!
12.7 Some useful functions
12.7.1 Create
devtools::create()function is used to create the basic structure of an R package. It sets up the necessary directories and files for package development.
12.7.2 Build
devtools::build()function is used to build the R package into a distributable format (e.g., a tar.gz file). This function compiles the package and prepares it for installation.
12.7.3 Documentation
roxygen2::roxygenise()function is used to generate documentation for R packages. It processes specially formatted comments in your R code and creates the necessary documentation files.
12.8 Good readings
Another good reference in writing a Rpackage written by Fong Chun Chan.
Resources
Wickham, H. and Bryan, J. R Package.