Jak ustawić obiekt tabeli w R?
Jak mogę ustawić tabelę na podstawie wartości i zwrócić te wartości? Zwraca tylko indeksy:
with(chickwts, table(feed))
with(chickwts, table(feed)) > 11
which(with(chickwts, table(feed)) > 11)
Wydajność
> with(chickwts, table(feed))
feed
casein horsebean linseed meatmeal soybean sunflower
12 10 12 11 14 12
> with(chickwts, table(feed)) > 11
feed
casein horsebean linseed meatmeal soybean sunflower
TRUE FALSE TRUE FALSE TRUE TRUE
> which(with(chickwts, table(feed)) > 11)
casein linseed soybean sunflower
1 3 5 6