You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In keyATM/keyATM#145, I propose a solution that works around it by essentially cancelling the "tableness" of the object as I presume it's not useful. I'm not sure we would want to cover objects like:
str(table(c(1, 2)) /2)
#> 'table' num [1:2(1d)] 0.5 0.5#> - attr(*, "dimnames")=List of 1#> ..$ : chr [1:2] "1" "2"
Created on 2020-07-16 by the reprex package (v0.3.0.9001)
I just learned that summary() creates subclassed "table"s, which can be numeric, so it definitely isn't just used for integer contingency tables by base R, even though the docs state:
table() returns a contingency table, an object of class "table", an array of integer values.
x<- summary(mtcars$mpg)
class(x)
#> [1] "summaryDefault" "table"x#> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 10.40 15.43 19.20 20.09 22.80 33.90
Activity
Avoid r-lib/vctrs#1190 issue
DavisVaughan commentedon Jul 20, 2020
I just learned that
summary()creates subclassed"table"s, which can be numeric, so it definitely isn't just used for integer contingency tables by base R, even though the docs state:Created on 2020-07-20 by the reprex package (v0.3.0)
It seems to be more like a wrapper type around integer / numeric arrays
Make `table` a wrapper type
Make `table` a wrapper type
Make `table` a wrapper type (#1230)