Re: [R] assignments to function return values

2009-07-18 Thread Duncan Murdoch
On 18/07/2009 1:08 PM, Barry Rowlingson wrote: On Sat, Jul 18, 2009 at 5:47 PM, Bernd wrote: colnames(m) = c("a", "b") I am fairly new to R and trying to understand this language. Having learned quite a few other programming languages the above statement when i saw it first immediately led to t

Re: [R] assignments to function return values

2009-07-18 Thread Gabor Grothendieck
To get help on a "replacement function" try this: ?"colnames<-" and to see its source: `colnames<-` On Sat, Jul 18, 2009 at 12:47 PM, Bernd wrote: > colnames(m) = c("a", "b") > > I am fairly new to R and trying to understand this language. Having > learned quite a few other programming languag

Re: [R] assignments to function return values

2009-07-18 Thread Barry Rowlingson
On Sat, Jul 18, 2009 at 5:47 PM, Bernd wrote: > colnames(m) = c("a", "b") > > I am fairly new to R and trying to understand this language. Having > learned quite a few other programming languages the above statement > when i saw it first immediately led to two reactions: > > (1) wtf? > > (2) maybe

[R] assignments to function return values

2009-07-18 Thread Bernd
colnames(m) = c("a", "b") I am fairly new to R and trying to understand this language. Having learned quite a few other programming languages the above statement when i saw it first immediately led to two reactions: (1) wtf? (2) maybe they made the function return an object with overloaded assig