R objects with reference semantics