r - How do I get the highest number from a dataframe with chars and numbers? -


i have dataframe dat:

label    col1  col2  col3 meat     10    20    30 veggies  20    30    40 

when run max(dat), error:

error in fun(x[[i]], ...) :    defined on data frame numeric variables 

if run max(sapply(dat, is.numeric)), 1.

what function(s) show me highest numeric value in dataframe chars , numbers?


Comments

Popular posts from this blog

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -