The issue you identified is explained in section 3.6 Calling Conventions
for Functions in Venables and Ripley (2002) Modern Applied Statistics in
S, 4th ed. (Springer, p. 56): "... specified arguments occurring after
the ... argument on the definition must be named exactly". Since
"collaps" does not match exactly "collapse", it is
interpreted as one of
the "..." arguments.
hope this helps.
spencer graves
Gabor Grothendieck wrote:> One gets a different response when abbreviating collapse= in
> paste? In the second case, it appears to be acting as if " + "
is just
> another argument to be pasted.
>
> # expected response
>
>>paste(c("X","Y"),1:4,sep="",collapse="
+ ")
>
> [1] "X1 + Y2 + X3 + Y4"
>
> # different!
>
>>paste(c("X","Y"),1:4,sep="",collaps="
+ ")
>
> [1] "X1 + " "Y2 + " "X3 + " "Y4 + "
>
> I am using R 1.7.1 on Windows 2000. The example is taken
> from MASS 2nd ed. page 42.
>
> Is this a bug?
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help