[R] 3 way crosstable not working

varin sacha v@r|n@@ch@ @end|ng |rom y@hoo@|r
Tue Mar 25 18:43:01 CET 2025


Dear R-experts,

Here below a toy example not working. After some researches on the Net, still don't get it !

Many thanks for your precious help.


#############################
library(knitr)
library(ggplot2)
library(pollster)
library(dplyr)
 
statut=c("married","not married","not married","married","divorced","divorced","married","not married","divorced","not married")
 
sex=c("male","female","female","male","female","female","male","female","male","male")
 
color=c("red","blue","green","green","blue","red","blue","green","red","blue")
data<- data.frame(statut, sex,color) 
 
crosstab_3way(df=data,x=statut, y= sex,z= color)
kable(digits=0,caption="Tableau 3 variables", format="html")
####################################
 



More information about the R-help mailing list