addOrgInfo {FindMyFriends} | R Documentation

## Safely add organisms info

### Description

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

### Usage

    addOrgInfo(object, ...)

    ## S4 method for signature 'pgVirtual'
    addOrgInfo(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 organism 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 added organism information.

### Methods (by class)

- `pgVirtual`: Add organism info safely for all pgVirtual subclasses

### See Also

Other Metadata: `addGroupInfo`, `groupInfo`, `orgInfo`

### Examples

    testPG <- .loadPgExample()

    # Create some information
    info <- data.frame(location=c('Copenhagen', 'Paris', 'London'),
        name=c('AE017243', 'AP012303', 'AE017244')
    )

    # Add the information
    testPG <- addOrgInfo(testPG, info=info, key='name')

[Package FindMyFriends version 1.19.0 Index]