r - Find the maximum and minimum value of every column and then find the maximum and minimum value of every row -
i've got matrix:
a <- matrix(rnorm(1000 * 18, mean = 100, sd = sqrt(10)), 1000, 18)
i find maximum , minimum value of every column , maximum , minimum value of every row.
figured out.
minimum , maximum of every column:
apply(a,2,min) apply(a,2,max)
minimum , maximum of every row:
apply(a,1,min) apply(a,1,max)
found information here http://www.personality-project.org/r/r.commands.html
Comments
Post a Comment