I use roxygen to create my own package. I have a function that causes a problem:
I created a package skeleton (with create (my-package) from devtools) and I used document () to handle roxygen tags. However, when I try to install my package, it fails:
... * setting reference indices ** building package indices ** testing if the installed package can be downloaded Error: the extract object was not found during the loading of the my-package namespace Error: loading failed The execution was paused
I am sure that roxygen believes that extract.sig.metadata is an S3 method, that is, a specialized form of export (), but it does not find the export () function, and therefore it breaks. But this is not the s3 method, it is just a function called extract.sig.metadata. If I look in the Rd code, the / use tag looks weird:
\usage{ \method{extract}{sig.metadata}(spec.df, var = "product_name", ratio.cutoff = 0.001, prob.modifer = 3, frequency.cutoff = NA, verbose = F, assign.to.global.env = FALSE, use.bigrams = T, clean = T, ngram.dupe.n.cutoff = 0.1, max.obs = 10000) }
If I change the name to extractSigMetadata, the problem has been technically fixed and the .Rd code will change,
\usage{ extractSigMetadata(foo) }
But I would really like not to change the name of my function (there are dozens of functions that have the same problem in my package, and they are used in a bunch of scripts - it would be a huge pain to change the name scheme not).
---> Does anyone know how I can tell roxygen that this is a normal function and not a weird s3 method? I suppose this has something to do with the @method tag, but I don't know how to use it correctly to make this work. Thanks!!!