---
layout: post
title: "R tools in readr for reading in fixed width files and other formats (CC249)"
blurb: "Fun tools in the readr package"
author: "PD Schloss"
date: 2022-09-19 11:00
comments: false
youtube: nNKwcIfcwgo
start_hash: e32a74def6af1b102af89d7f752918067f2c4a6c
end_hash: a6c2e10069b8ec02e8be6a58fd5706c08bc87b79
---

The readr R package numerous tools for reading in various types of text files including fixed width files (fwf), tab separated values (tsv) files, and comma separated values (csv) files. In this episode Pat shows how to read in fwf files with `read_fwf` and some useful tools that are shared across readr functions for making it easier to read in one or many files. He also discusses various arguments in the tar program for extracting files from compressed archives to specific directories. The overall goal of this project is to highlight reproducible research practices using a number of tools. The specific output from this project will be a map-based visual that shows the level of drought across the globe.

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