Skip to content
Prev 45758 / 63424 Next

Subset of a 'table' divided by a 'table' is a 'table', but printed by 'print.default'

On Tue, Apr 30, 2013 at 10:49 AM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:

            
Also happens with *, if LHS is not a scalar:

 > c(1,1)*table(x)
x
A B
2 2
attr(,"class")
[1] "table"

 > 1*table(x)
x
A B
2 2

 - similar with + and -, but not unary + and -.

 Nice to see a bug in arithmetic operators that isn't covered by
everyone screaming "FAQ 7.31!!!"

Barry