Skip to content
master
Switch branches/tags
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

tidyowl: Learning to draw the owl in the tidyverse

The goal of the tidyowl package is to provide some additional learnr tutorials as a path to learning how to do advanced things with the tidyverse, including:

  • tidyselect
  • rowwise()/nest_by()
  • purrr

In other words, we're learning how to draw the f**king owl:

Drawing the owl illustration in "just" two easy steps

Installation

You can install the github version with the following commands:

install.packages("remotes")
remotes::install_github("laderast/tidyowl")

learning_tidyselect

tidyselect lets you programmatically select columns to do things with it. For example, you could select all of the columns in penguins that contains the string "bill".

This tutorial also covers across and other column-wise operations.

Learning Objectives for learning_tidyselect

  • Understand how tidyselect helper functions (contains(), all_of()) work with select().
  • Understand how where() works with select and .is* functions
  • Learn how to combine helpers with c() and find the complement using -
  • Apply across() to work with mutate() to mutate multiple columns
  • Apply across() with summarize() to summarize multiple columns

Run this Tutorial

To run the learning tidyselect tutorial:

library(tidyowl)
learn_tidyselect()

If you don't have R installed on your machine, you can still run the tutorial by going to this mybinder.org link (it may take a little time to launch, be patient):

https://mybinder.org/v2/gh/laderast/tidyowl/master?urlpath=shiny/learning_tidyselect/

learning_rowwise (in development)

Sometimes you need to calculate things row by row. In this tutorial, we cover the rowwise() workflow and use it with mutate()/summarize(). We also cover using nest_by() to make list-columns, and finally run multiple models on each row of a nested data frame.

Learning Objectives

  • Learn and apply rowwise() to produce row-by-row summaries
  • Understand what c_across() does
  • Use nest_by() to make list-columns
  • Access the data in a list-column and do things with it.
  • Run multiple statistical models on a list-column using rowwise()

Run this Tutorial

To run the learning rowwise tutorial:

library(tidyowl)
learn_rowwise()

If you don't have R installed, you can run the tutorial online by going to this mybinder.org link (it may take a little time to launch, be patient):

https://mybinder.org/v2/gh/laderast/tidyowl/master?urlpath=shiny/learning_rowwise/

Acknowledgements

This tutorial was partially derived and inspired from the following links:

Thanks to Rebecca Barter for suggesting that I flesh out the function descriptions some more. Thanks to Garrick Aden-Buie for his suggestion about sum_mm and sum().

Code of Conduct

Please note that the tidyowl project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

LearnR repository for intermediate tidyverse lessons (drawing the f**king owl)

Resources

License

Releases

No releases published

Packages

No packages published

Languages