0

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.

John Paul
  • 12,196
  • 6
  • 55
  • 75
Usobi
  • 1,816
  • 4
  • 18
  • 25

1 Answers1

2

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

exportClasses(webSource)
agstudy
  • 119,832
  • 17
  • 199
  • 261