문제

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.

도움이 되었습니까?

해결책

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

exportClasses(webSource)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top