reorder_list_numeric: Reorder Data Frames in List by Numeric Name

View source: R/reorder_list_numeric.R

reorder_list_numericR Documentation

Reorder Data Frames in List by Numeric Name

Description

This function takes a list of data frames and reorders them based on the numeric values embedded within their names.

Usage

reorder_list_numeric(df_list)

Arguments

df_list

A list of data frames.

Value

A list of data frames ordered by the numeric values extracted from their names.

Examples

df1 <- data.frame(x = 1:3)
df713 <- data.frame(y = 4:6)
df42 <- data.frame(z = 7:9)

my_list <- list("42" = df42, "713" = df713, "1" = df1)
reordered_list <- reorder_list_numeric(my_list)

natehall329/nate_utils documentation built on Dec. 31, 2024, 3:25 p.m.