Question

I am creating a personal package with some S4 classes. When I run the Build and Reload button in the Rstudio IDE I get the next message.

in method for ‘checkNewItems’ with signature ‘"webSource"’: no definition for class "webSource"

The Class declaration webSource is in a different file where the checkNewItems method is and I am guessing that is the reason why I am getting that message. In the source code that I have makes more sense to have the class declaration in other place rather than next to the methods checkNewItems.

Which is the idiomatic workaround that R programmers use for this?

Also, from the point of view of the Lazyloading that R uses I assumed that this should not happen.

Was it helpful?

Solution

You should export your class. In your namespace file you add this:

exportClasses(webSource)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top