R trick: Creating Pascal’s Triangle with accumulate()

accumulate() function for recursive formulas

Published

March 28, 2020

Notable topics: accumulate() function for recursive formulas

Recorded on: 2020-03-28

Timestamps by: Alex Cookson

View code

Screencast

Timestamps

accumulate

Simple explanation of accumulate function

Example using letters

~

Using tilde ~ to create an anonymous function

Introducing Pascal's Triangle

Starting to create Pascal's triangle in R

accumulate

Concerting the conceptual solution into an accumulate function