Test code for returning a pointer to R to allow c++ objects to persist in the interactive R session