How do I code a summation?


Each Yij is a different column name with digits in each column. There are a total of four columns.

Making up some data for the numerator and denominator

num <- matrix(1,nrow = 10,ncol = 8)
denom <- matrix(1,nrow = 10,ncol = 8)

then

colSums(num/denom)