#' @name find_max
#'
#' @export
#'
#' @title This function finds the maximum value from a vector
#'
#' @description This function finds the maximum value from a vector
#'
#' @param vector A vector of values
#'
#' @return A maximum value from the given vector
#'
#' @author Som Bohora
#'
#' @examples
#'
#'find_max(c(2,3,200,5,6,7))
find_max <- function(vector) {
max_value <- vector[1]
for (i in 1:length(vector)) {
if (vector[i] > max_value)
max_value <- vector[i]
}
return(max_value)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.