1 year ago

#287729

test-img

eartoolbox

Why are arguments missing from my roxygen2 package documentation?

I want to export documentation for a function in my package. I click inside the function body and use the Code > Insert Roxygen Skeleton option in RStudio. However, for this particular function, it only exports the argument "report_SNR" in the documentation. All the others are ignored, even though Roxygen creates param names for them. In the end, my function file looks like this:

#' Setup pages
#'
#' @param input
#' @param headphones
#' @param SNR_test
#' @param min_SNR
#' @param get_user_info
#' @param demo
#' @param get_instrument_range
#' @param absolute_url
#' @param select_instrument
#' @param get_instrument_range_musical_notation
#' @param adjust_range
#' @param test_type
#' @param microphone_test
#' @param allow_repeat_SNR_tests
#' @param report_SNR
#'
#' @return
#' @export
#'
#' @examples
setup_pages <- function(input = c("microphone",
                                  "midi_keyboard",
                                  "midi_keyboard_and_microphone",
                                  "midi_keyboard_or_microphone"),
                        headphones = TRUE,
                         SNR_test = TRUE,
                        min_SNR = 14,
                         get_user_info = TRUE,
                        demo = FALSE,
                        get_instrument_range = FALSE,
                        absolute_url,
                        select_instrument = FALSE,
                        get_instrument_range_musical_notation = FALSE,
                        adjust_range = FALSE,
                        test_type = c("voice", "instrument"),
                        microphone_test = TRUE,
                        allow_repeat_SNR_tests = TRUE,
                        report_SNR = FALSE) {

    # function body
}

The only warnings I get when I run document() are to include descriptions/examples. There are no warnings about syntax.

Other functions render fine in the documentation. I wonder what is wrong for this particular one?

r

r-package

roxygen2

0 Answers

Your Answer

Accepted video resources