You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When implementing a base generic function for an S4 class in a package, the function definition of the generic has to be located in the same R script (file) as the class definition. If not, the following warning (?) be generated when building or loading the function:
> devtools::load_all(".")
ℹ Loading myPackage
in method for ‘format’ with signature ‘"myS4class"’: no definition for class “myS4class”
Strangely enough, devtools::check() issues the warning at the beginning of its run, but it will not flag it as an error or a warning as it finishes. The code also runs without problem and performs as expected.
I trawled through the internet looking for answers, including your excellent books, but came up with nothing. (I finally figured it out myself.) You might want to note this in chapter 15, for instance right after the show() method in section 15.4.3.
The text was updated successfully, but these errors were encountered:
When implementing a base generic function for an S4 class in a package, the function definition of the generic has to be located in the same R script (file) as the class definition. If not, the following warning (?) be generated when building or loading the function:
Strangely enough,
devtools::check()
issues the warning at the beginning of its run, but it will not flag it as an error or a warning as it finishes. The code also runs without problem and performs as expected.I trawled through the internet looking for answers, including your excellent books, but came up with nothing. (I finally figured it out myself.) You might want to note this in chapter 15, for instance right after the
show()
method in section 15.4.3.The text was updated successfully, but these errors were encountered: