1 Matching Annotations
  1. May 2019
    1. bottles <- function(i) { if (i > 2) { bottles <- str_c(i - 1, " bottles") } else if (i == 2) { bottles <- "1 bottle" } else { bottles <- "no more bottles" } bottles }

      I think this should read:

      
      bottles <- function(i) {
        if (i > 1) {
          bottles <- str_c(i , " bottles")
        } else if (i == 1) {
          bottles <- "1 bottle"
        } else {
          bottles <- "no more bottles"
        }
        bottles
      }
      

      Otherwise you get no bottles of beer twice in the final output