I have a function I am trying to document with roxygen2:
#' Name of function
#'
#' Description
#'
#' @param x The input data
#' @param method one of:
#' "method1" - very long text here
#' "method2" - very long text here
#' "method3" - very long text here
#' "method4" - very long text here
#' "method5" - very long text here
#' "method6" - very long text here
#' "method7" - very long text here
#' "method8" - very long text here
#' "method9" - very long text here
#' "method10" - very long text here
myfun <- function (x, method){return(NULL)}
This function has about 10 different methods, each of which has a very long description. I want a newline between each "method," to make it easy to quickly see the different methods available.
As written, when I call roxygenize('mypackage')
, the above text get squashed into a single line.
How do I manually insert line breaks into roxygen2 documentation?
#'
gets inserted in automatically. In some cirumstances you need to add\cr
to break a line. – Thibodeaux\itemize
or\enumerate
. – Francefranceneggplot2:::rd_aesthetics("geom", "point")
(ggplot2 has a programmatic approach to certain parts of the documentation). – Francefrancene\cr
belong? At the end of the first line? At the beginning of the second line? In between them in its own line? I've tried all of these with no luck. @Tyler Rinker could you submit an answer with an example? – Depressant