setChannelNames {twoddpcr} | R Documentation

## Rename the channels.

### Description

We use the channel names "Ch1.Amplitude" and "Ch2.Amplitude" by default. This method allows us to change it at will.

### Usage

    setChannelNames(droplets, ch1 = "Ch1.Amplitude", ch2 = "Ch2.Amplitude")

    ## S4 method for signature 'data.frame'
    setChannelNames(droplets, ch1 = "Ch1.Amplitude",
      ch2 = "Ch2.Amplitude")

    ## S4 method for signature 'list'
    setChannelNames(droplets, ch1 = "Ch1.Amplitude",
      ch2 = "Ch2.Amplitude")

### Arguments

`droplets` | A data frame or list of data frames. Each data frame should have at least two columns, where the first two columns should be vectors of doubles.
`ch1` | The channel 1 label.
`ch2` | The channel 2 label.

### Value

The object `droplets` with the channels renamed.

### Examples

    ## Ensure that a data frame has channels named "Ch1.Amplitude" and
    ## "Ch2.Amplitude".
    aWell <- KRASdata[["E03"]]
    aWell <- setChannelNames(aWell)
    colnames(aWell)

    ## Perhaps we want to abbreviate the channel names.
    aWell <- setChannelNames(aWell, "Ch1", "Ch2")
    colnames(aWell)

    ## The same operator works for a list of data frames.
    krasWells <- KRASdata
    krasWells <- setChannelNames(krasWells, "Ch1", "Ch2")
    lapply(krasWells, colnames)[1:3]

[Package twoddpcr version 1.11.0 Index]