This works:
#' Name of function
#'
#' Description
#'
#' @param x The input data
#' @param method one of: \cr
#' "method1" - very long text here \cr
#' "method2" - very long text here \cr
#' "method3" - very long text here \cr
#' "method4" - very long text here \cr
#' "method5" - very long text here \cr
#' "method6" - very long text here \cr
#' "method7" - very long text here \cr
#' "method8" - very long text here \cr
#' "method9" - very long text here \cr
#' "method10" - very long text here \cr
myfun <- function (x, method){return(NULL)}
Here is an actual example in a repo where I use \cr
: https://github.com/trinker/SOdemoing/blob/master/R/FUN.R
Also @Gregor's comment is well taken. That would look like:
#' @param method2 one of:
#' \itemize{
#' \item method1 - very long text here
#' \item method2 - very long text here
#' \item method3 - very long text here
#' \item method4 - very long text here
#' \item method5 - very long text here
#' \item method6 - very long text here
#' \item method7 - very long text here
#' \item method8 - very long text here
#' \item method9 - very long text here
#' \item method10 - very long text here
#' }
Here you can see the output for both:
I created a GitHub repo, SOdemoing, to test things like this (more elaborate package related questions and answers) out. See FUN.R where I test both approaches using roxygen2
and then the resulting help manual where I set this up (again the function is FUN.R).