Re: [Rd] diag() when input is a numeric scalar

2013-05-02 Thread philchalmers
Thanks for the reply Michael, Although I probably would lean a bit more to the 'strict mode', I wouldn't suggest changing the default behavior since it could break existing code and goes against R's current philosophy. However, adding an additional argument to some functions where the floating dig

Re: [Rd] diag() when input is a numeric scalar

2013-05-02 Thread R. Michael Weylandt
On Thu, May 2, 2013 at 12:35 AM, philchalmers wrote: > Hi All, > > I'm wondering why when passing a single numeric value that contains any > decimals to diag() that the value is silently coerced to a integer for > constructing an identify matrix. To me, an input like diag(5.435) seems > fairly amb

[Rd] diag() when input is a numeric scalar

2013-05-02 Thread philchalmers
Hi All, I'm wondering why when passing a single numeric value that contains any decimals to diag() that the value is silently coerced to a integer for constructing an identify matrix. To me, an input like diag(5.435) seems fairly ambiguous and is more than likely a programming mistake, since it's