我是使用sciplot
獲得實驗數據的忠實粉絲,因爲我不必手動計算誤差線。在過去,我已經將它用於將在兩個因子變量,使得:使用`gpplot2`使用多因素變量複製`sciplot`
plot1<-bargraph.CI(
df$factor1, #categorical factor for the x-axis
df$y, #numerical DV for the y-axis
df$factor2 #grouping factor
)
不過,我現在有超過三個因素變量需要組。該sciplot
文件表明,這是不可能的sciplot.
所以,現在來的必要的時間來問...如何在世界上做這與ggplot2
?具體來說,是否有一個吝嗇的方法來生成一個誤差超過3個因子變量的圖?我探討了網絡,在尋找一個優雅的解決方案時不斷探索。下面
的樣本數據:
factor1 factor2 factor3 y
More expensive Least important Blue 1
Less expensive Most important Blue 0
Same cost Least important Red 1
More expensive Least important Red 0
Less expensive Most important Red 1
Same cost Least important Blue 1
More expensive Least important Red 1
Less expensive Least important Blue 0
Same cost Most important Red 1
當你說*組在三個因子變量*你的意思是聚合因子包含3個變量,或在某種程度上要包括之間的第三個因素變量x軸分組因子? – mnel 2013-04-22 01:45:56
後者 - 我想在x軸分組因子之間加入第三個因子變量! – roody 2013-04-22 01:46:32