Description Usage Arguments Value Examples
Given a list/environment of data frames and one or more attributes, it finds the one dataframe having most columns/rows named as specified by the attributes. The default function used for matching is starts_with (dplyr v.1.0.7)
1 | highest_in(listOrEnv, ..., FUN = dplyr::starts_with, row = F)
|
listOrEnv |
container of the input dataframes |
... |
one or more attributes to search by, the type depends on the FUN accepted input (default:character) |
FUN |
the function to apply for matching column or row names (default: starts_with) |
row |
if TRUE row names are used for search and scoring |
a dataframe from listOrEnv
1 2 3 4 | df1<-mtcars[1:9,];df2<-mtcars[10:16,]
highest_in(list(df1,df2),"Merc",row=T)
highest_in(list(df1,df2),c("Merc","Cadillac"),row=T)
highest_in(list(df1,df2),c("Merc","Valiant"),row=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.