r4ds/transform.Rmd

28 lines
764 B
Plaintext
Raw Normal View History

2015-09-21 21:41:14 +08:00
---
layout: default
title: Data transformation
output: bookdown::html_chapter
---
## Missing values
* Why `NA == NA` is not `TRUE`
* Why default is `na.rm = FALSE`.
## Data types
Overview of different data types and useful summary functions for working with them. Strings and dates covered in more detail in future chapters.
Need to mention `typeof()` vs. `class()` mostly in context of how date/times and factors are built on top of simpler structures.
### 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