绘制定性问题与定量问题

时间:2015-08-10 17:24:57

标签: r plot

我和我的学生一起进行调查,我想在R中创建一个图表来绘制具体问题。我特别感兴趣的是看到这两个问题之间的关系:

Q5. How do you find the pace of the lecture?
a) Way too fast
b) A bit too fast
c) About right
d) A bit too slow
e) Way too slow

Q8:Outside of lectures how much time a week do you devote to this class?
 _________ (hrs)

在这种情况下,哪种R图表是可取的?

1 个答案:

答案 0 :(得分:1)

我想说boxplot()可能适合这里。例如:

blur

plot

或者可能是积分图:

paces <- c('wayslow','slow','right','fast','wayfast');
set.seed(1);
N <- 30;
df <- data.frame(pace=factor(sample(paces,N,replace=T),paces),outside=runif(N,5,30));
boxplot(outside~pace,df,xlab='Pace of Lecture',ylab='Hours Outside of Lecture');

plot2