find the maximum number in a list of numbers in r

You can use the max() function in R to find the maximum number in a list of numbers.

Here's an example:

main.r
my_list <- c(10, 50, 20, 80, 5)  # create a list of numbers
max(my_list)                     # find the maximum number in the list
131 chars
3 lines

The output would be 80, which is the maximum number in the list.

related categories

gistlibby LogSnag