How to sort all dataframes in a list of dataframes on the same column?

Use lapply:

sorted_dataframes_list <- lapply(dataframes_list, function(df){
                                 df[order(df$enrichment),]
                                 })

Leave a Comment