-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Labels
Description
When using the following R code as the whole content of a single hello.R file residing in the R folder of a default package structure (e.g. the test package from Rstudio) a warning "Warning: @description [hello.R#1]: requires a value" is generated, when running roxygen using devtools::document(roclets=c('rd', 'collate', 'namespace')).
#'
#' @name testClass
#' @title testClass
#'
#' @slot one character.
#' @slot two numeric.
#'
#' @export
setClass("testClass",
slots = c("one" = "character",
"two" = "numeric"),
prototype = c("one" = "fump",
"two" = 6))
It is fixed by removing the first line of roxygen comment. The following code does not produce the warning:
#' @name testClass
#' @title testClass
#'
#' @slot one character.
#' @slot two numeric.
#'
#' @export
setClass("testClass",
slots = c("one" = "character",
"two" = "numeric"),
prototype = c("one" = "fump",
"two" = 6))
It seems to me, that the warning is at least misleading. It maybe a bug, since the difference between the two coding blocks is not existant.
gabrielodom and IndrajeetPatil