Skip to contents

generate_plate() transforms a dataframe or tibble into microwell plate data for visual inspection. It performs the reverse of tidy_plate().

Usage

generate_plate(x, well_id, plate_type, file)

Arguments

x

A dataframe or tibble.

well_id

A character string or an integer indicating the column containing the well ids.

plate_type

A specific integer (6, 12, 24, 48, 96, 384, 1536) indicating the type of microwell plate.

file

A character string with the output file path. Only CSV and XLSX files are supported.

Value

A CSV or XLSX file, written to file.

Details

Validation errors identify the offending input row or column when available. Row numbers refer to the input data frame, not the output file.

Examples

file_path <- system.file("extdata", "tidy_12_well.csv", package = "tidyplate")
tbl <- read.csv(file_path)
temp_file <- tempfile(fileext = ".csv")
generate_plate(tbl, well_id = "well", plate_type = 12, file = temp_file)