Re: [R] how to pass object "members" in functions

2010-12-22 Thread Paul Rigor
Thanks for the clarification! I actually got the function working by passing just the individual objects as separate arguments. But creating a wrapper list object should suffice and I'll just have the function return the modified list object to achieve what I want. Cheers, Paul On Wed, Dec 22, 2

Re: [R] how to pass object "members" in functions

2010-12-22 Thread Duncan Murdoch
On 22/12/2010 6:20 AM, Paul Rigor wrote: Hello, This is an R-syntax question when attempting to manipulate/access objects when passed to a function. I have a function attempting to just print values attached to an argument object. For example, printThis<- function(obj, parm2, parm3) { print

Re: [R] how to pass object "members" in functions

2010-12-22 Thread Barry Rowlingson
On Wed, Dec 22, 2010 at 11:20 AM, Paul Rigor wrote: > Hello, > This is an R-syntax question when attempting to manipulate/access objects > when passed to a function. > > I have a function attempting to just print values attached to an argument > object. For example, > > printThis <- function(obj,

[R] how to pass object "members" in functions

2010-12-22 Thread Paul Rigor
Hello, This is an R-syntax question when attempting to manipulate/access objects when passed to a function. I have a function attempting to just print values attached to an argument object. For example, printThis <- function(obj, parm2, parm3) { print(obj.stuff1) print(obj.stuff2) } where