Last active
December 5, 2015 13:57
-
-
Save sureshgorakala/0da95b4412ee63a713ad to your computer and use it in GitHub Desktop.
BloggerGist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#mean of the rows | |
apply(m, 1, mean) | |
# mean of the columns | |
apply(m, 2, mean) | |
# divide all values by 2 | |
apply(m, 1:2, function(x) x/2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment