Add option to specify package of R class. Implements issue #607.

I went ahead and implemented #607. Let me know what you think.

Cheers,
Adrian