Re: [R] Modify objects in function

2013-01-31 Thread Simon Zehnder
Hi Barry, this actually a good idea, to put them together! Probably even creating an object containing both of them. Haven't thought about it before. Best Simon On Jan 31, 2013, at 3:49 PM, Barry Rowlingson wrote: > On Thu, Jan 31, 2013 at 11:52 AM, Simon Zehnder wrote: >> Dear R community,

Re: [R] Modify objects in function

2013-01-31 Thread Simon Zehnder
Dear Barry, thank you very much for this information. This looks pretty interesting! Best Simon On Jan 31, 2013, at 4:09 PM, Barry Rowlingson wrote: >> it lets you do: >> >> (a~b~c) = foo() > > Mistook. should be: > > (a~b~c) %=% foo() > > because it defines the %=% operator. > > Barry

Re: [R] Modify objects in function

2013-01-31 Thread Gabor Grothendieck
On Thu, Jan 31, 2013 at 6:52 AM, Simon Zehnder wrote: > Dear R community, > > I do know, that an R function is constructing a copy of any object passed as > argument into a function. I program on a larger S4 project for a package, and > I arrived at a point where I have to think a little harder

Re: [R] Modify objects in function

2013-01-31 Thread Barry Rowlingson
On Thu, Jan 31, 2013 at 3:00 PM, Simon Zehnder wrote: > Hi Barry, > > this actually a good idea, to put them together! Probably even creating an > object containing both of them. Haven't thought about it before. > Hadley W asked for implementations of 'unstructuring assignments' the other day,

Re: [R] Modify objects in function

2013-01-31 Thread Barry Rowlingson
> it lets you do: > > (a~b~c) = foo() Mistook. should be: (a~b~c) %=% foo() because it defines the %=% operator. Barry __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-

Re: [R] Modify objects in function

2013-01-31 Thread Barry Rowlingson
On Thu, Jan 31, 2013 at 11:52 AM, Simon Zehnder wrote: > Dear R community, > > I do know, that an R function is constructing a copy of any object passed as > argument into a function. I program on a larger S4 project for a package, and > I arrived at a point where I have to think a little harder

[R] Modify objects in function

2013-01-31 Thread Simon Zehnder
Dear R community, I do know, that an R function is constructing a copy of any object passed as argument into a function. I program on a larger S4 project 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 obje