label_data: Join raw data and plate layout tibbles into a single, labeled...

View source: R/label_data.R

label_dataR Documentation

Join raw data and plate layout tibbles into a single, labeled tibble

Description

label_data() joins two tibbles into one: raw data, and the experimental information provided by the plate layout. The single tibble which results, which contains both raw data and experimental conditions associated with each well, allows handling and visualiation of data based on experimental variables.

Usage

label_data(
  data,
  layout,
  join_by = "well",
  drop_empties = TRUE,
  .drop_from = protein,
  .drop_matches = c("Empty", "empty"),
  .make_numeric = c(),
  .make_character = c()
)

Arguments

data

A tibble containg raw data to be joined with the layout tibble, and at least one column also present in the layout tibble, typically "well".

layout

A tibble, containing at least one column also present in the data tibble, typically "well", which will be used to join with the data tibble. Additional columns in the layout tibble contain information associated with each well, typically experimental variables, which will also be joined with the data. Typically, the layout tibble is created by reading in plate layout file using the function read_plate_layout()

join_by

A column shared between the data and layout, identical in name and related in content. Typically "well".

drop_empties

TRUE or FALSE value, determining whether data from particular wells should be dropped from the output tibble. Defaults to TRUE.

.drop_from

If drop_empties is set to TRUE, the unquoted name of the column which will be used to perform value-based filtering.

.drop_matches

A vector containing all values which, if present in the .drop_from column, will trigger the removal of those wells from the output tibble.

.make_numeric

A vector containing the names of any columns from the layout which, if not already numeric, should be coerced to numeric. Numeric-type columns are automatically detected using readr::parse_guess() in read_plate_layout, so this argument is necessary only if a user wants to override the decision made by readr::parse_guess().

.make_character

A vector containing the names of any columns from the layout which, if not already of type character, should be coerced to character. Character-type columns are automatically detected using readr::parse_guess() in read_plate_layout, so this argument is necessary only if a user wants to override the decision made by readr::parse_guess().

Value

A tibble, containing all columns present in the input data and layout tibbles, joined into a single, labeled tibble.


taiawu/dsfworld_package documentation built on June 18, 2024, 5:39 a.m.