2013-09-25 30 views

回答

2

試試這個

plot(obs_v_exp$observed, type="l") 
lines(obs_v_exp$expected, col="red") 

下面是一個例子:

set.seed(2) 
obs_v_exp <- data.frame(observed=sample(0:6, 10, TRUE), 
         expected=sample(0:6, 10, TRUE)) 
plot(obs_v_exp$observed, type="l") 
lines(obs_v_exp$expected, col="red") 

enter image description here

+0

類型參數是過時的,這並沒有活像ķ。謝謝 – CadisEtRama

+0

它沒有工作?類型參數已過時?我不明白你的意思。 –

1

看那matplot功能:

matplot(obs_v_exp, type='l')