don't change values of R objects in C code, this caused problems with byte compiling. ctree_memory() had to be removed in this process.