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

ReferenceClass method documentation generates error for parameterised methods #180

imanuelcostigan opened this issue Jan 31, 2014 · 1 comment


Copy link

I have a reference class, say Blob, that has some methods defined by a function elsewhere. This function has one argument, say type.

draw.Blob <- function (type = 'small') 
   type <<- 'small'

Blob <- setRefClass (
  Class = "Blob", 
  fields = list(type = 'character'),
  methods = list(draw = draw.Blob)

When running document(clean=TRUE) and then check_doc(), I get the following error:

> check_doc()
Updating packageName documentation
Checking documentation
Blob-class.Rd: non-ASCII input and no declared encoding
problem found in ‘Blob-class.Rd’

When I delete the type parameter from draw.Blob, the error message goes away. There are no obvious issues with the Rd file that was generated - and certainly no obvious (visible) non ASCII characters in the Rd file.

Perhaps a separate issue is that when I change the draw.Blob docstring or even remove the function's parameter, and run document(), it doesn't pick up the change. When I run document(clean=TRUE) the change is picked up (unsurprisingly).

Copy link

I've pushed this example to my roxygentest repo. You can reproduce the error from this.

@hadley hadley closed this as completed in 802515b Feb 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant