我想创建一个包含比例表的数据框,在这个表中我想强调两个变量的某些组合。我想用黄色突出显示值为:
的单元格蓝色和低蓝 高和绿 红色和高
当前代码:
df <- data.frame(op=c("high","medium","low","high","high","medium","low","high","medium"),fr=c("blue","red","green","green","red","blue","red","green","red"))
mytable <- table(df$op,df$fr)
df2 <- prop.table(mytable)