You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
166 B

3 years ago
  1. sum1 <- function(m) {
  2. res = 0
  3. for(i in 1:dim(m)[1]) {
  4. for(j in 1:dim(m)[2]) {
  5. res <- res + m[i,j]
  6. }
  7. }
  8. return(res)
  9. }