Yuca
Yuca

Reputation: 71

Roxygen2 document dependency of a function

I wonder how one should document that a function requires a second function or a package. Are there specific tags do to so or should I just say so n the function description?

#' @title Downloads stuff from that place
#' 
#' @details Maybe document the dependency here?
#' 
#' @param stuff Thing to be downloaded
#' @param save_to Where to place the thing
#' @return Nothing. Called for its side effect

download_stuff = function(stuff, save_to) {

    require('RCurl')               # How do document this?

    # thing = download stuff using RCurl
    # write thing to save_to
}

Upvotes: 3

Views: 456

Answers (1)

Yuca
Yuca

Reputation: 71

I ended up using the idea shown in this post, and wrote the following:

#'@section Dependencies: 
#'  \describe {
#'    \item{package_1}
#'    \item{package_2}
#'    \item{package_n}
#'  }

Upvotes: 4

Related Questions