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
would create two 2-way tables, with cyl in the row position. A variation on that theme would be to add an argument like rowDominant=TRUE as the default. Switching it to FALSE would put the first variable in the piped list into the column position.
This is inconsistent with how base::table() works, but I rarely see a need to do 3-way tables while creating sets of 2-way tables nearly every day.
The text was updated successfully, but these errors were encountered:
Congrats on changing the syntax to be more compatible with the tidyverse! Another change that would be most helpful would be to have this code:
mtcars %>%
select(cyl, am) %>%
jmv::contTables(pcRow = TRUE)
do the same thing as this:
mtcars%>%
jmv::contTables(
rows = 'cyl',
cols = 'am', pcRow = TRUE)
That would get it working more similarly to corrMatrix which would correlate those two if piped in.
An interesting extension to this would be to allow for multiple tables when the number of variables selected in the pipeline exceeds 2. So this code:
mtcars %>%
select(cyl, am, gear) %>%
jmv::contTables(pcRow = TRUE)
would create two 2-way tables, with cyl in the row position. A variation on that theme would be to add an argument like rowDominant=TRUE as the default. Switching it to FALSE would put the first variable in the piped list into the column position.
This is inconsistent with how base::table() works, but I rarely see a need to do 3-way tables while creating sets of 2-way tables nearly every day.
The text was updated successfully, but these errors were encountered: