r - How to find highest value in a data frame? -


i have dataframe x values:

   x1  x2  x3 1  na   4   1 2  na   3  na 3   4  na   2 4  na   1  11 5  na   2  na 6   5  na   1 7   5   9  na 8  na   2  na 

a simple question: how highest value? (11)

use max() na.rm argument set true:

dat <- read.table(text="    x1  x2  x3 1  na   4   1 2  na   3  na 3   4  na   2 4  na   1  11 5  na   2  na 6   5  na   1 7   5   9  na 8  na   2  na", header=true) 

get maximum:

max(dat, na.rm=true) [1] 11 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -