tidyverse 101 is a place to learn “byte sized” tips to learn all things tidyverse. tidyverse, is a suit of R packages, developed/maintained by RStudio team. Tidyverse package are primarily designed with a uniform design principles for doing data science. The core list of R packages in tidyverse include, one of the most commonly use R packages
- readr, for easy reading and writing of data files in tabular form
- dplyr, for making common data manipulation tasks easier
- tidyr, for reshaping the data from wide to long/tidy and vice versa
- ggplot2, for making gorgeous plots
- tibble, for simpler and easier data frames
- stringr, for all things strings in R
- purrr, for working with functions and vectors without many loops.
- forcats, for easily dealing with factor/categorical variables
We will use the latest version of some of the tidyverse packages, including ggplot2 3.3.0. and dplyr 1.0. and tidyr 1.0.
So get started with installing all of tidyverse packages with a single command first.
install.packages("tidyverse")
Learning the basics of tidyverse will give you a great toolset to do data science with R. We will start with the basics and cover the newest features of tidyverse that will help you solve common data science challenges in an elegant way.
Here are a few “byte sized” posts on all things tidyverse to start with and watch out this space for more.
- glimpse(),head(), and view(): How To Get A Peek at Dataframe in R
- dplyr count(): Explore Variables with count()
- dplyr select(): Select one or more variables from a dataframe
- dplyr mutate(): Create New Variables with mutate
- dplyr arrange(): Sort/Reorder by One or More Variables
- dplyr filter(): Filter/Select Rows based on conditions
- dplyr groupby() and summarize(): Group By One or More Variables
- How to Compute Summary Statistics Across Multiple Columns in R
- 4 ways to select columns from a dataframe with dplyr’s select()
- How To Move A Column to the Front with dplyr
- How To Remove Rows with Missing values using dplyr
- How To Reshape Tidy Data to Wide Data with pivot_wider() from tidyr
- How To Reshape Wide Data to Tidy Data with pivot_longer() in tidyr
- 4 Tidyverse Tips for Future Self: case_when(), fct_relevel(), fct_recode(), scale_fill_brewer()
- 7 Tips to Add Columns to a DataFrame with add_column() in tidyverse
- How To Categorize Multiple Numerical Columns in R
- 10 Tips to Customize Text Color, Font, Size in ggplot2 with element_text()
- 15 Tips to Customize lines in ggplot2 with element_line()
- How to Write Functions to Make Plots with ggplot2 in R