R Tidyverse
The Tidyverse is a collection of R packages designed for data science. It includes packages like dplyr
, ggplot2
, tidyr
, readr
, and more, all sharing a common philosophy and data structures.
Key Topics
Installing Tidyverse
# Installing the Tidyverse
install.packages("tidyverse")
# Loading the Tidyverse
library(tidyverse)
Note:
The
tidyverse
package installs and loads all the core Tidyverse packages.
Using Tidyverse Packages
Once loaded, you can use functions from various Tidyverse packages for data manipulation and visualization.
# Using dplyr functions
data %>% filter(Age > 25) %>% select(Name, Age)
Note:
The
%>%
operator (pipe) is used to chain multiple operations.
Key Takeaways
- The Tidyverse simplifies data manipulation and visualization in R.
- Use
install.packages("tidyverse")
to install it. - Functions from Tidyverse packages can be chained together using the pipe operator
%>%
.