|
Data Science Desktop Survival Guide
by Graham Williams |
|
|||
Assignment |
20200105
- implies
a flow of data and for readability is explicit about the intention.
Preferred
|
a <- 42
b <- mean(x) Discouraged |
|
a = 42
b = mean(x)
The forward assignment base::- Preferred |
|
ds[vars] %>%
sapply(function(x) all(x == x[1L])) %>% which() %>% names() %T>% print() -> constants Traditional |
|
constants <-
ds[vars] %>% sapply(function(x) all(x == x[1L])) %>% which() %>% names() %T>% print() Discouraged |
|
ds[vars] %>%
sapply(function(x) all(x == x[1L])) %>% which() %>% names() %T>% print() -> constants
|