Skip to contents

Remove empty wells from data

Usage

qp_remove_empty(x)

# S3 method for data.frame
qp_remove_empty(x)

# S3 method for list
qp_remove_empty(x)

Arguments

x

A data.frame or list containing a data.frame named qp containing columns .pred_conc and sample_type. See details.

Value

Same as input

Details

This function keeps any columns with positive .pred_conc or sample_type == "standard"

Examples


df <- expand.grid(
  .pred_conc = 0:1,
  sample_type = c("standard", "unknown")
)

df
#>   .pred_conc sample_type
#> 1          0    standard
#> 2          1    standard
#> 3          0     unknown
#> 4          1     unknown

qp_remove_empty(df)
#>   .pred_conc sample_type
#> 1          0    standard
#> 2          1    standard
#> 3          1     unknown