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.