0

I am working on extending a class in a pre-existing package (xcms) in R. What I would like to do is include my class in the package after loading the package since there are non-exported methods in the package my extended class will need to use. Example below.

Package xcms

Class to extend foo

Extended class foo2

Now I want to be able to do the following:

library(xcms)

setClass(foo2,....)

'define functions of foo2'

'insert foo2 into xcms somehow so it can see all of the non-exported functions and classes'

Cole

Cole
  • 600
  • 6
  • 12
  • Here's a question from a few years ago with several good answers: http://stackoverflow.com/questions/3094232/add-objects-to-package-namespace – Peyton May 07 '14 at 15:44
  • Awesome! I tried searching for something like that but couldn't find anything for the life of me. How did you find that? – Cole May 07 '14 at 16:09
  • Yeah, it doesn't show up under the Related sidebar either. I got there by Googling "r package environment". I was curious myself. – Peyton May 07 '14 at 16:20
  • You should post the link as an answer. – Cole May 07 '14 at 17:49

0 Answers0