Developing Data Products Quiz 3

This is Quiz 3 from the Developing Data Products course within the Data Science Specialization. This publication is intended as a learning resource, all answers are documented and explained.

Questions


1. WWhich of the following items is required for an R package to pass R CMD check without any warnings or errors?


  • An explicit software license



2. Which of the following is a generic function in a fresh installation of R, with only the default packages loaded? (Select all that apply)


  • show

  • mean

  • predict


3. What function is used to obtain the function body for an S4 method function?


  • getMethod()



4. Please download the R package DDPQuiz3 from the course web site. Examine the 𝚌𝚛𝚎𝚊𝚝𝚎𝚖𝚎𝚊𝚗 function implemented in the R/ sub-directory. What is the appropriate text to place above the 𝚌𝚛𝚎𝚊𝚝𝚎𝚖𝚎𝚊𝚗 function for Roxygen2 to create a complete help file?


#' This function calculates the mean
#' 
#' @param x is a numeric vector
#' @return the mean of x
#' @export
#' @examples 
#' x <- 1:10
#' createmean(x)


Check out my website at: http://www.ryantillis.com/