
上QQ阅读APP看书,第一时间看更新
Basic dplyr usage
We have already used some dplyr commands in the previous section and, here, we'll be looking at the standard functions. dplyr provides a set of useful verbs that can be used in conjunction with one another (using the pipe operator or otherwise) to produce the final result.
These verbs are set out in the following list:
-
- sample_n and sample_frac: To extract random values
- summarise: To aggregate values
- mutate: To add new variables
- arrange: To sort the dataset
- filter: To filter the data and extract relevant rows
- Select: To select columns from the dataset