---
layout: post
title: "Creating and using a matrix using base R (CC172)"
blurb: "Working with vectors in base R"
author: "PD Schloss"
date: 2021-12-16 11:00
comments: false
youtube: aixOiaLyoq
start_hash: 7f4a0efbd4de39a2f9f4fd8684ea1328fe7a7f71
end_hash: 966c744d50e4941b8b91e7867e49eca919973c76
---

A matrix in base R is vector of vectors where all of the data in the matrix is of the same type. This data structure has important uses for things like working with distance matrices, performing linear algebra, and other applications. If you understand how to work with R's vectors, working with a matrix in base R will be straightforward. 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 }})
