1

I used RStudio's "Build and Reload" feature to build a new function:

#' minimal example
#' @param param1 First param
#' @export
#' @examples
#' train.caret.model.list()
#' 
train.hello.world <- function(){
  return ("hello world")
}

I looked in my NAMESPACE file where I expected to find the following generated:

export(train.hello.world)

But when I checked the NAMESPACE file, what was actually generated was:

S3method(train,hello.world)

It looks like there's something special in starting a function name with "train."

It might have something to do with my package including caret as a dependency, as you can see in this line from my description file:

Depends: fmri, oro.nifti, doMC, caret

I am writing a wrapper function for caret's train function. I can imagine this feature could be quite helpful to know, but I couldn't find any reference to this behavior online.

I'm also using roxygen2 for documentation, but I don't think that's relevant.

Ben Smith
  • 85
  • 2
  • 11
  • 2
    I think roxygen is very relevant and your answer lies here: http://stackoverflow.com/questions/24594507/exporting-non-s3-methods-with-dots-in-the-name-using-roxygen2-v4 – MrFlick Apr 19 '15 at 01:31

0 Answers0