Function to return the column with the max value (or value of function provided)
1 | col_compare(df, cols, fun = which.max)
|
df |
dataframe object |
cols |
column(s) to remove NA and replace with 0 |
fun |
operator function to apply across columns, defaults to max |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.