#e.g. each number in df1 needs to be divided by the correponding value in df2
Var<- c("t1","t2","t3","t4","t5","t6","t7","t8","t9","t10","t11")
value1 <- c(2,3.1,4.5,5.1,6.5,7.1,8.5,9.11,10.1,11.8,12.3)
value2 <- c(2.5,3.1,4.5,5.1,12,7.1,8.5,9.11,10.1,17.8,12.3)
df_1 <- data.frame(Var,value1,value2)
Var<- c("t1","t2","t3","t4","t5","t6","t7","t8","t9","t10","t11")
value1 <- c(2.2,3.3,4.5,5.1,6.5,13,0,0,10.1,1,12.3)
value2 <- c(2.7,3.3,4.6,5.1,6.5,13,0,0,15.1,5.1,12.3)
df_2 <- data.frame(Var,value1,value2)
鑑於實際的數據幀非常大,我正在尋找一種有效的方法。如何將數據幀的值除以另一個數據幀的相應值?
感謝
'df_1 [-1]/df_2 [-1]' – akrun