[R] Using apply

Steven Yen @tyen @ending from ntu@edu@tw
Wed Oct 31 03:28:14 CET 2018


I need help with "apply". Below, I have no problem getting the column sums.
1. How do I get the sum of squares?
2. In general, where do I look up these functions?
Thanks.

x<-matrix(1:10,nrow=5); x
sum <- apply(x,2,sum); sum




	[[alternative HTML version deleted]]



More information about the R-help mailing list