Converts data.frame object to to adpcr or dpcr object. The resulting object will have "tnp" type.

df2dpcr(df)

Arguments

df
data frame with specified column names. See Details.

Value

An object of adpcr or dpcr type, depends on the presence of additional column with panel indices (see Details).

Details

The data frame must have following columns with exactly specified names:

experiment
names of experiments
replicate
indices of replicates
assay
names of assays
k
number of positive partitions
n
total number of partitions

There are also one optional column:

panel_id
indices of panels

If the additional column is present, the resulting object has adpcr type.

See also

Flexibly create dpcr objects: create_dpcr Inverse function: dpcr2df

Examples

dat <- data.frame(experiment = factor(rep(paste0("Experiment", 1L:2), 3)), replicate = c(1, 1, 2, 2, 3, 3), assay = "Assay1", k = c(55, 121, 43, 150, 70, 131), n = 765, v = 1, uv = 0) df2dpcr(dat)
#> The assumed volume uncertainty in each run is equal to 0.
#> Experiment1.1 Experiment2.1 Experiment1.2 Experiment2.2 Experiment1.3 #> [1,] 55 121 43 150 70 #> Experiment2.3 #> [1,] 131 #> #> Data type: 'tnp'