groupPerElem {psichomics} | R Documentation

## Assign one group to each element

### Description

Assign one group to each element

### Usage

    groupPerElem(groups, elem = NULL, outerGroupName = NA)

    groupPerPatient(groups, patients = NULL, includeOuterGroup = FALSE,
      outerGroupName = "(Outer data)")

    groupPerSample(groups, samples, includeOuterGroup = FALSE,
      outerGroupName = "(Outer data)")

### Arguments

`groups` | List of integers: groups of elements
`elem` | Character: all elements available (NULL by default)
`outerGroupName` | Character: name to give to outer group (NA by default; set to NULL to only show elements matched to their respective groups)
`patients` | Integer: total number of patients
`includeOuterGroup` | Boolean: join the patients that have no groups?
`samples` | Character: all available samples

### Value

Character vector where each element corresponds to the group of the respective element

### Examples

    groups <- list(1:3, 4:7, 8:10)
    names(groups) <- paste("Stage", 1:3)
    groupPerElem(groups)

[Package psichomics version 1.6.2 Index]