addGroupInfo {FindMyFriends} | R Documentation

## Safely add group info

### Description

This method allows for adding of group metadata by specifying the name of the metadata and the gene groups it should be added to. It protects the user from overwriting information that is derived from the data, and ensures the proper formatting. Should be prefered to `groupInfo<-` for all but the simplest cases.

### Usage

    addGroupInfo(object, ...)

    ## S4 method for signature 'pgVirtual'
    addGroupInfo(object, info, key)

### Arguments

`object` | A pgVirtual subclass
`...` | parameters passed on.
`info` | A data.frame with information to add
`key` | Either an integer vector with the index of each gene group the rows in info corresponds to, or the name of the column in info that holds the indexes.

### Value

An object of the same class as object with the new gene group information.

### Methods (by class)

- `pgVirtual`: Add gene group info safely for all pgVirtual subclasses

### See Also

Other Metadata: `addOrgInfo`, `groupInfo`, `orgInfo`

### Examples

    testPG <- .loadPgExample(withGroups=TRUE)

    # Create some info
    info <- data.frame(nickname=c('Tessie', 'Johnny'), index=c(4, 500))

    # Add it to the object
    testPG <- addGroupInfo(testPG, info=info, key='index')

[Package FindMyFriends version 1.10.0 Index]