[R-pkg-devel] Which is correct ImportFrom or ImportMethodsFrom
Glenn Schultz
glennmschultz at me.com
Tue May 24 21:53:27 CEST 2016
All,
My question is
ImportMethodsFrom package foo
-or-
ImportFrom package foo
Which is correct?
I have a package BondLab. I am creating new package which uses BondLab classes, generics, and methods. The new package extends S4 classes to a S4 new class. The getters are created per BioConductor getting started with S4. I can either:
importMethodsFrom BondLab foo
-or-
importFrom BondLab foo.
Both work as far a R CMD check not giving a warning and the getters work as well in the new package for either case. Given that both seem to work what is the technically correct way to do this ImportMethodsFrom or ImportFrom. This maybe a trivial question but I want to make sure I am following the correct protocol. What is the difference between the two?
Thanks,
Glenn
More information about the R-package-devel
mailing list