r4ds/transform.Rmd

39 lines
836 B
Plaintext
Raw Normal View History

2015-09-21 21:41:14 +08:00
---
layout: default
title: Data transformation
output: bookdown::html_chapter
---
2015-12-08 20:09:42 +08:00
# Data transformation {#transform}
2015-12-06 22:02:29 +08:00
Copy from dplyr vignettes.
2015-09-21 21:41:14 +08:00
2015-12-06 22:02:29 +08:00
## Filter
### Missing values
2015-09-21 21:41:14 +08:00
* Why `NA == NA` is not `TRUE`
* Why default is `na.rm = FALSE`.
2015-12-06 22:02:29 +08:00
## Mutate
## Arrange
2015-09-21 21:41:14 +08:00
2015-12-06 22:02:29 +08:00
## Select
2015-09-21 21:41:14 +08:00
2015-12-06 22:02:29 +08:00
## Grouped summaries
Overview of different data types and useful summary functions for working with them. Strings and dates covered in more detail in future chapters. Anything complicated can be put off until data structures chapter.
2015-09-21 21:41:14 +08:00
### Logical
When used with numeric functions, `TRUE` is converted to 1 and `FALSE` to 0. This makes `sum()` and `mean()` particularly useful: `sum(x)` gives the number of `TRUE`s in `x`, and `mean(x)` gives the proportion.
### Numeric (integer and double)
### Strings (and factors)
### Date/times
2015-12-06 22:02:29 +08:00
## Grouped mutate