I have an S7 class that I created with S7::new_class() in one .R file, and then each associated method I grouped with it's generic into their own .R files.
When running check() or document() the S7::method call can't find my class and I get an error. But, moving all generics/methods that use one of my newly defined classes into the same .R file allows all checks and documentation to work.
So, is this the expected behavior and all related class methods/generics should be together?
Or, is it unexpected and generics/methods elsewhere should be able to find their objects? I was tempted to run use_package and add my actual package, but that seemed weird to have to declare that my package uses itself.
I have an S7 class that I created with
S7::new_class()
in one .R file, and then each associated method I grouped with it's generic into their own .R files.When running
check()
ordocument()
theS7::method
call can't find my class and I get an error. But, moving all generics/methods that use one of my newly defined classes into the same .R file allows all checks and documentation to work.So, is this the expected behavior and all related class methods/generics should be together?
Or, is it unexpected and generics/methods elsewhere should be able to find their objects? I was tempted to run
use_package
and add my actual package, but that seemed weird to have to declare that my package uses itself.Thanks for any help.