עזרה בggplot: כיצד עושים position_dodge לגובה?

5 views
Skip to first unread message

Saar Alon Barkat

unread,
Jul 15, 2016, 12:27:37 AM7/15/16
to Israel R User Group
אני מעוניין להשתמש בposition_dodge לגובה, במקום לרוחב (לצורך coefficient plot שבו המקדמים בציר הX והמשתנים בציר בY, עם אינטראקציה). מישהו יודע איך עושים את זה?

[מחיפוש ברשת, שמתי לב שבעבר ניתן היה להגדיר בposition_dodge גם גובה (height), אבל אני לא מוצא את האופציה הזאת היום, ולא מצאתי משהו שמחליף אותה].

מצ"ב הקובץ CSV והסקריפט (ללא הposition...):


ggplot(k.all, aes(Estimate, vars, fill=attitude,colour=attitude,group=attitude))+
  geom_vline(xintercept=0, lty=2, lwd=1, colour="grey20") +
  geom_point(size=4, pch=21)+
  geom_errorbarh(aes(xmin=Estimate - 1.96*se, xmax=Estimate + 1.96*se), 
                lwd=1, height=0)+
scale_x_continuous(name = "Coefficient estimates",limits = c(-3,2))+
  scale_y_discrete(name = "independent variables") +
  theme_bw()


תודה רבה על העזרה. 



סער
model coefficients.csv
Reply all
Reply to author
Forward
0 new messages