# Create dummy data
data <- data.frame(
weighted_8.5 = c(1, 2, 3),
weighted_10 = c(4, 5, 6),
`8` = c(7, 8, 9),
other = c(10, 11, 12)
)
# Find weighted columns
weighted_cols <- find_columns_by_pattern(data, pattern = "weighted_")
# Find numeric-only named columns (e.g., "8")
length_cols <- find_columns_by_pattern(data, pattern = "")
Run the code above in your browser using DataLab