Bivariate tables on R

Hi had a question on how to create bivariate tables on R'

library(data.table)
dat<-data.table(Dystrophy_extraction)

library(dplyr)
library(magrittr)
#need to convert numeric into characters
dat %<>% mutate_if(is.numeric,as.character)

attach(dat)
library(Publish)

write.csv(
summary(univariateTable( subgroup~ variable+ variable, data=dat)), file=".csv", row.names=F)

This is the code im using and I essentially want to add another subgroup, but I keep getting an error when I do that.
Any help would be much appreciated :slight_smile:

Hard to fashion an answer without a a reprex. See the FAQ.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.