# Helpers for working with data frames

## Delete data.frame columns

    df <- data.frame("label" = c("A", "B"), "number" = 1:10)
    delete_data_frame_columns(df = df, column_names = "label")
    #>    number
    #> 1       1
    #> 2       2
    #> 3       3
    #> 4       4
    #> 5       5
    #> 6       6
    #> 7       7
    #> 8       8
    #> 9       9
    #> 10     10
    delete_data_frame_columns(df = df, column_names = "number")
    #>    label
    #> 1      A
    #> 2      B
    #> 3      A
    #> 4      B
    #> 5      A
    #> 6      B
    #> 7      A
    #> 8      B
    #> 9      A
    #> 10     B
    delete_data_frame_columns(df = df, column_names = c("label", "number"))
    #> data frame with 0 columns and 10 rows

## Group a data.frame

    df <- data.frame("label" = c("A", "B"), "number" = 1:10)
    group_data_frame(df = df, by = "label")
    #> $A
    #>   label number
    #> 1     A      1
    #> 3     A      3
    #> 5     A      5
    #> 7     A      7
    #> 9     A      9
    #>
    #> $B
    #>    label number
    #> 2      B      2
    #> 4      B      4
    #> 6      B      6
    #> 8      B      8
    #> 10     B     10
    group_data_frame(df = df, by = "label", keep_by = FALSE)
    #> $A
    #>   number
    #> 1      1
    #> 3      3
    #> 5      5
    #> 7      7
    #> 9      9
    #>
    #> $B
    #>    number
    #> 2       2
    #> 4       4
    #> 6       6
    #> 8       8
    #> 10     10