Skip to content
Prev 243796 / 398506 Next

using ``<-'' in function argument

On 12/02/2010 09:35 PM, Jinsong Zhao wrote:
Yes, R gives the global variable ncol a value of 4. Try typing

 > ncol
before and after your example.

The second argument to the matrix function is now the value 4, and R uses
positional matching to give that argument (nrow) a value of 4. Thus,
the result.

Moral of the story: don't do that. :)
--Erik