The docstring explanation at 3:30 in the video + slides is not entirely correct. The parts with the documentation need to be inside the curly brackets.
The code should read:
multiply <- function(x,y){
#' @title Multiply two numbers
#' @description This function takes two
#' input numbers and multiplies
#' them. It returns the multiplied result.
#' @param x The first value
#' @param y The second value
#' @return The two arguments multiplied.
return(x*y)
}
?multiply
The docstring explanation at 3:30 in the video + slides is not entirely correct. The parts with the documentation need to be inside the curly brackets.
The code should read: