---
layout: post
title: "The tutorial you need to maximize your use of R's vectors (CC273)"
blurb: "Benchmarking R's vectors (part 1)"
author: "PD Schloss"
date: 2024-04-11 11:00
comments: false
youtube: MpenxnZAw6o
start_hash: cdfa2cde961ad1b6e7ef987b90ca52beb0f6526e
end_hash: 2825e220a4ede03a9a99a06241e90a0b6701b43e
---

This tutorial should clear up a lot of misconceptions about R's vectors and for loops. Pat goes through a variety of approaches for building vectors and getting values out of vectors. He uses the microbenchmark package to evaluate their speed for different sized vectors. Rcpp will also make a cameo. You'll likely be surprised by the results! This episode is part of an ongoing effort to develop an R package that implements the naive Bayesian classifier.

<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/phylotyper/tree/{{page.start_hash}})
* [end of the episode](https://github.com/riffomonas/phylotyper/tree/{{page.end_hash}})
