Learn R Programming

dpcR (version 0.1.2-1)

extract_dpcr: Extract Digital PCR Experiment

Description

Extract panel(s) or experiment(s) from a matrix while preserving all other attributes.

Usage

extract_dpcr(input, id)

Arguments

input
object of the class adpcr or ddpcr.
id
vector of indices or names of experiments or panels.

Value

  • The object of the input's class (adpcr or ddpcr).

Details

The extract_dpcr function allows to choose one or more panels from an object of the adpcr or ddpcr class and save it without changing other attributes. It is the most recommended method of extracting a subset from an array of panels, because it preserves class and structure of the object in contrary to standard operator Extract.

Examples

Run this code
#sample extracting
panels <- sim_adpcr(10, 40, 1000, pos_sums = FALSE, n_panels = 50)
single_panel <- extract_dpcr(panels, 5)
random_three <- extract_dpcr(panels, sample.int(ncol(panels), 3))
all_but_one <- extract_dpcr(panels, -5)

#the same for fluorescence data
fluos <- sim_ddpcr(10, 40, 1000, pos_sums = FALSE, n_exp = 50, fluo = list(0.1, 0))
single_fluo <- extract_dpcr(fluos, 5)

Run the code above in your browser using DataLab