3 Matching Annotations
- Feb 2020
-
r4ds.had.co.nz r4ds.had.co.nz
-
commas <- function(...) stringr::str_c(..., collapse = ", ")
no braces needed for function on a single line
Tags
Annotators
URL
-
-
r4ds.had.co.nz r4ds.had.co.nz
-
it’s the same as the input!
because we want to modify columns in place
-
Compute the mean of every column in mtcars.
output <- vector("double", ncol(mtcars)) # 1. output for (i in seq_along(mtcars)) { # 2. sequence output[[i]] <- mean(mtcars[[i]]) # 3. body }
Tags
Annotators
URL
-