Another one just for fun:
prop.table(table(interaction(x)))
or possibly
prop.table(table(droplevels(interaction(x
Best,
Ista
On Thu, May 21, 2020 at 1:22 PM Jeff Reichman wrote:
>
> R-help forum
>
>
>
> Looking for a function or some guidance for obtaining the percentage of
> attribute
One possible way
library(tidyr)
dat1 <- structure(list(V1 = c("A", "A", "A", "A", "A", "A", "A", "A",
"A", "A"), V2 = c("A", "B", "A", "A", "A", "B", "C", "C", "B",
"C"), V3 = c("B", "C", "D", "B", "B", "C", "B", "B", "C", "C"
)), class = "data.frame", row.names = c(NA, -10L))
dat2 <-
R-help forum
Looking for a function or some guidance for obtaining the percentage of
attribute combinations, for example
V1 V2 V3
A A B
A B C
A A D
A A B
A
3 matches
Mail list logo