Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@slot tag generating check error #181

Closed
imanuelcostigan opened this issue Feb 1, 2014 · 3 comments
Closed

@slot tag generating check error #181

imanuelcostigan opened this issue Feb 1, 2014 · 3 comments

Comments

@imanuelcostigan
Copy link

@imanuelcostigan imanuelcostigan commented Feb 1, 2014

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

@hadley
Copy link
Member

@hadley hadley commented Feb 3, 2014

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

@imanuelcostigan
Copy link
Author

@imanuelcostigan imanuelcostigan commented Feb 3, 2014

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.

@hadley
Copy link
Member

@hadley hadley commented Feb 3, 2014

Grrr. At least it's an easy fix.

@hadley hadley closed this in 7ea9554 Feb 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants