setChannelNames: Rename the channels.

Description Usage Arguments Value Examples

Description

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

Usage

1
2
3
4
5
6
7
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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]

CRUKMI-ComputationalBiology/twoddpcr documentation built on Feb. 14, 2021, 9:18 p.m.