---
layout: post
title: "Integrating ideas from Stack Overflow to improve our R code (CC287)"
blurb: "Getting R help from Stack Overflow"
author: "PD Schloss"
date: 2024-05-30 11:00
comments: false
youtube: ePqqhrSeKzM
start_hash: 010f74ea8bb82833b7836dde8ee98de8d6e5a1b8
end_hash: 0ece114dfcf5263ac18446c34b0aa49a7832411b
---

Stack Overflow is a great source of information to get ideas on how to improve our R code. In this episode of Code Club, Pat will walk through how he uses suggestions from Stack Overflow to integrate the ideas into his own code. Surprisingly, for dividing a matrix by a vector he gets slightly different results from what was shown on Stack Overflow underscoring the value of doing your own benchmarking and profiling. 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/phylotypr/tree/{{page.start_hash}})
* [end of the episode](https://github.com/riffomonas/phylotyprr/tree/{{page.end_hash}})
