Skip to content
Prev 243831 / 398506 Next

using ``<-'' in function argument

On 12/03/2010 06:54 AM, Berwin A Turlach wrote:
Let's say: as no argument name was given, the positional matching applied. And 
evaluation took place when argument no. 2 was required.

Of course, you could give an argument name:
 > matrix(ncol <- 4)
      [,1]
[1,]    4
 > matrix(nrow = ncol <- 4)
      [,1]
[1,]   NA
[2,]   NA
[3,]   NA
[4,]   NA


Claudia