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

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

angular - DownloadURL return null in below code -