Displaying 1 result from an estimated 1 matches for "producesometh".
2013 Jan 31
5
Modify objects in function
...ject for a package, and I arrived at a point where I have to think a little harder on implementation style (especially to spare users complex object handling).
I have a function foo(), taking as input arguments two S4 objects of different class type
foo <- function(o1, o2) {
o1 at att1 <- producesomething()
o2 at att2 <- producesomethingelse()
}
Of course, this functions does not change the objects in the global environment. Now I have two choices
1. Change the objects and return a list with both objects:
foo <- function(o1, o2) {
o1 at att1 <- producesomething()
o2 at att2 &...