R/minmaxcolrow.r

Defines functions maxCol minRow minCol maxRow

Documented in maxCol maxRow minCol minRow

# Obvious quickies


maxRow <- function(mat,ties.method = c("random", "first", "last")) {
foo <- max.col(t(mat), ties.method)
return(invisible(foo))
}


minCol <-function(mat, ties.method = c("random", "first", "last")){
foo <- max.col(-mat, ties.method)
return(invisible(foo))
}

minRow <-function(mat, ties.method = c("random", "first", "last")) {
foo <- max.col(t(-mat), ties.method)
}
maxCol <-function(mat, ties.method = c("random", "first", "last")){
foo <- max.col(mat, ties.method)
return(invisible(foo))
}

Try the cgwtools package in your browser

Any scripts or data that you put into this service are public.

cgwtools documentation built on Oct. 21, 2023, 1:06 a.m.