Module 10: Friedman R Package Proposal


    For this assignment, I created the initial structure for an R package called Friedman. The goal of this project was to learn how R packages are built and how they organize code, documentation, and metadata in a standardized way. Before this assignment, I didn’t fully understand how packages worked behind the scenes, so this helped me see how everything is connected.

Purpose and Scope

The purpose of the Friedman package is to make it easier to reuse code for data analysis and data mining tasks. In many assignments, I find myself writing similar code over and over again, especially for summarizing data or preparing results. This package is designed to group those repeated tasks into simple, reusable functions.

The intended users are students and beginner R users who want a basic toolkit to help with analysis. Instead of rewriting code each time, they can use functions from the package to save time and stay organized.

Key Functions

Right now, the package includes one main function:

  • summary_stats() – This function takes a numeric vector and returns basic descriptive statistics, including the mean, median, minimum, maximum, and standard deviation.

In the future, I would expand this package by adding more functions such as:

  • cleaning missing data

  • creating visualizations

  • generating simple model summaries

These additions would make the package more useful for complete data analysis workflows.

DESCRIPTION File Decisions

The DESCRIPTION file is one of the most important parts of an R package because it contains all the metadata needed for installation and use. I set the version to 0.0.0.9000 since the package is still in development. I included R (>= 3.1.2) under Depends because that is the required minimum version.

I also added ggplot2 and dplyr under Imports since these are commonly used packages for data analysis that I may use in future functions. Even though they are not heavily used yet, including them prepares the package for future expansion.

For the license, I chose CC0, which allows the package to be freely used and shared. I used the Authors@R field to identify myself as both the author and maintainer of the package.

GitHub Repository

You can view the full package structure and files here:

https://github.com/zaragz/advanced-r-programmin-/tree/main/assignments/module-10-r-package

 

Reflection

This assignment helped me understand that an R package is more than just a collection of functions. It includes structure, documentation, and metadata that make the code easier to share and maintain. The most important thing I learned was how the DESCRIPTION file controls the package and how tools like roxygen2 automatically generate documentation.

Overall, this project made the idea of building packages much clearer, and I can see how this would be useful for larger projects in the future.

Comments

Popular posts from this blog

Module 5: Determinant and Inverse of Matrices in R

Creating and Analyzing Data Frames in R