---
layout: post
title: "What's the difference between a matrix, data frame, and tibble in R? (CC180)"
blurb: "Matrices, distance matrices, data frames, and tibbles"
author: "PD Schloss"
date: 2022-01-20 11:00
comments: false
youtube: og-7bG2i9TU
start_hash: 0456b8820ef3f036ce06708f1f8a69a9a30f1a87
end_hash: c7b0cc2f1a109885f24bac712bd7b78ee912ad45
---

Do you know when to use a matrix, data frame, or tibble in R? Do you know how to use each or even what the differences are between these three types of variables? In this episode of Code Club, Pat will show you how to convert the same data between the different types using base R functions. Finally, he'll bring back the tidyverse to show why he prefers to work with data frames as tibbles. This is part of a series of videos demonstrating how to functions from base R to make these data compatible with tools from the tidyverse


<iframe style="margin: 0 auto;display:block;" width="560" height="315" src="https://www.youtube.com/embed/{{ page.youtube }}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


## Code

You can browse the state of the repository at the
* [beginning of the episode](https://github.com/riffomonas/distances/tree/{{ page.start_hash }})
* [end of the episode](https://github.com/riffomonas/distances/tree/{{ page.end_hash }})
