2
facet_grid
で使用する列名のリストがあります。いくつかの列名を選択し、+
をfacet_grid
function requiredとしたいと思います。列名をリストから削除してfacet_gridで使用する
私はmtcars
でこれを試しましたが、なぜunlist
またはpaste
が機能していないのか理解できませんでした。 combine_varsで
names=paste(unlist(names(mtcars)[c(1,3,5)]),sep='+')
library(ggplot2)
ggplot(mtcars, aes("", hp)) +
geom_boxplot(width=0.7, position=position_dodge(0.7)) +
theme_bw() +
facet_grid(. ~ names,switch = 'both',labeller = label_both)
エラー (データは、$ plot_env、COLS、=ののparams $ドロップをドロップparamsは):あなたが使用することができます
おかげブライアン。あなたのソリューションはエレガントです! – Alexander