5 Matching Annotations
  1. Feb 2020
    1. commas <- function(...) stringr::str_c(..., collapse = ", ")

      no braces needed for function on a single line

    1. it’s the same as the input!

      because we want to modify columns in place

    2. 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
      }
      
  2. Jul 2019
    1. The book is written in RMarkdown with bookdown. It is automatically rebuilt from source by travis. R4DS is a collaborative effort and many people have contributed fixes and improvements via pull request.

      anyone other r4ds_slackers using bookdown?

    2. Anyone in the Slack group interested in sharing comments directly on this page via this hypothesis tool? We can use the tag "r4ds_slackers"