On 31-12-2012, at 03:24, meng <laomen...@163.com> wrote:

> 
> I type:
> dat*rep(z,rach=nrow(dat))
> "rach" is "each" indeed,but I type "rach" mistakenly.
> What's strange to me is :No error reply appears,but show me the result:
>> dat*rep(z,rach=nrow(dat))
>     x1    x2    x3
> 1   0.1   0.4   0.7
> 2  20.0  50.0  80.0
> 3 300.0 600.0 900.0
> Why does it happen,and what "rach" means?

If you read the help for rep() with for example ?rep you will see that rep() 
has a … argument which caters for "further arguments that are passed to or from 
other methods". rach is regarded as part of … and is therefore not treated as 
an error. You could also use ZZZ=nrow(dat).

Berend
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to