Skip to content

@slot tag generating check error #181

Closed

Description

@imanuelcostigan

Code block

draw.Blob <- function (type = 'small') 
{
  'Something about blobs'
  type <<- 'small'
}

#' Blob
#'
#' Blah blah blah
#' 
#' @slot type a character vector
#' @examples
#' Blob(type = 'small')
#' @export
Blob <- setRefClass (
  Class = "Blob", 
  fields = list(type = 'character'),
  methods = list(draw = draw.Blob)
)

check() generates following error message:

* checking for code/documentation mismatches ... WARNING
S4 class codoc mismatches from documentation object 'Blob-class':
Slots for class 'Blob'
  Code: .xData
  Inherited: .xData
  Docs: type

If I remove the roxygen line starting with @slot this error message goes away.

Reproducible example on the slot_issues branch of roxygentest repo

Perhaps useful throwaway comment here:

Also @field tag for RC a la @slot for S4

Activity

  1. hadley commented on Feb 3, 2014

    @hadley
    Member

    If you can figure out how to make the Rd file correct, could you please include here?

  2. imanuelcostigan commented on Feb 3, 2014

    @imanuelcostigan
    Author

    Rd file generated by roxygen looks like this:

    \section{Slots}{
    
    \describe{
    \item{\code{type}}{a character vector}
    }}
    

    Changing first line to \section{Fields} solved the problem.

  3. hadley commented on Feb 3, 2014

    @hadley
    Member

    Grrr. At least it's an easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions