split_exposures_by_subgroups {YAPSA} | R Documentation

## Split an exposures data frame by subgroups

### Description

If a cohort consists of different subgroups, this function enables to split the data frame storing the signature exposures into a list of data frames with signature exposures, one per subgroup. This functionality is needed for `stat_test_subgroups` and `stat_plot_subgroups`

### Usage

    split_exposures_by_subgroups(in_exposures_df, in_subgroups_df,
      in_subgroups.field = "subgroup", in_PID.field = "PID")

### Arguments

`in_exposures_df` | Numerical data frame of the exposures (i.e. contributions of the different signatures to the number of point mutations per PID)
`in_subgroups_df` | Data frame indicating which PID belongs to which subgroup
`in_subgroups.field` | Name indicating which column in `in_subgroups_df` contains the subgroup information
`in_PID.field` | Name indicating which column in `in_subgroups_df` contains the PID information

### Value

List of data frames with the subgroup specific signature exposures.

### See Also

`stat_test_subgroups`

`stat_plot_subgroups`

### Examples

     NULL

[Package YAPSA version 1.12.0 Index]