groupPerElem {psichomics} | R Documentation

## Assign one group to each element

### Description

Assign one group to each element

### Usage

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

### Arguments

`groups` | List of integers: groups of elements
`elem` | Character: all elements available
`outerGroupName` | Character: name to give to outer group (if `NULL`, only show elements matched to their respective groups)

### Value

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

### See Also

Other functions for data grouping: `createGroupByAttribute()`, `getGeneList()`, `getSampleFromSubject()`, `getSubjectFromSample()`, `plotGroupIndependence()`, `testGroupIndependence()`

### Examples

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

[Package psichomics version 1.20.2 Index]