xi <- c(3:5,8,8,8,9:11,14)

yi <- c(5,4,5,4,7,8,8,9,10,10)

xiyi <- xi*yi

xisq <- xi^2

yisq <- yi^2

cSum <- rowSums(xi)

fg <- data.frame(xi, yi, xiyi, xisq, yisq)

View(fg)

Trying to get the total sum in every column but unable to get it. Can somebody help me to get the result? Above is the code. Thankyou in advance.