May 2019
Beginner to intermediate
266 pages
5h 57m
English
unite focuses on combining multiple columns into a single column. This is regarded as a convenience function that pastes multiple columns together.
The basic implementation syntax is as follows:
unite(data, col, ..., sep = "_", remove = TRUE)
Here, the parameters are as follows:
In our dataset, where we need to combine Fuel Type columns and Drive versus Cylinder attributes to understand the fuel efficiency, we can use the unite function with a separator value to combine the columns:
> mpg4<- ...
Read now
Unlock full access