Skip to content
Prev 366969 / 398506 Next

Using a mock of an S4 class

You seem like you have painted yourself into a corner... you want to access slots in an S4 object yet you don't want to create one. Are you going to do this test without the benefit of an operating system either? 

Beware of getting too meta... David didn't say you had to use an S4 object defined elsewhere... you invented that. But you do have to use the setClass function to create an S4 class with which you can create an object. No class, no object, mock or otherwise.

Me, I like S3.