This repository contains the second programming assignment for an R course, focused on caching expensive computations by leveraging R’s scoping rules. The assignment walks you through creating a special matrix object that stores both a matrix and its cached inverse, avoiding repeated calls to costly operations. It builds on a worked example that caches the mean of a numeric vector, demonstrating how the operator preserves state across function calls. You then implement analogous logic for matrices via two functions, one to construct the cache-aware object and another to compute or retrieve the cached inverse. The instructions emphasize using solve for inversion and assuming that the supplied matrix is always invertible. The repository outlines the workflow for forking, editing the provided R stub, committing your solution, and submitting your repository URL as the final deliverable.

Features

  • Provides R script templates for a programming assignment
  • Demonstrates lexical scoping concepts in R
  • Implements caching to avoid redundant matrix inversion
  • Includes instructions for modifying provided functions
  • Helps learners practice functional programming in R
  • Serves as coursework material for the Coursera specialization

Project Samples

Project Activity

See All Activity >

Categories

Education

Follow ProgrammingAssignment2

ProgrammingAssignment2 Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of ProgrammingAssignment2!

Additional Project Details

Programming Language

R

Related Categories

R Education Software

Registered

2025-09-24