Package {tidyplate}


Type: Package
Title: Transform Microplate Data into Tibbles
Version: 3.0.0
Maintainer: Shubham Dutta <shubhamdutta26@gmail.com>
Description: The goal of 'tidyplate' is to help researchers convert different types of microplates into tibbles which can be used in data analysis. It accepts xlsx and csv files formatted in a specific way as input. It supports all types of standard microplate formats such as 6-well, 12-well, 24-well, 48-well, 96-well, 384-well, and, 1536-well plates.
License: MIT + file LICENSE
URL: https://shubhamdutta26.github.io/tidyplate/, https://github.com/shubhamdutta26/tidyplate
BugReports: https://github.com/shubhamdutta26/tidyplate/issues
Imports: data.table, lifecycle, openxlsx, readxl, rlang, tibble, tools, utils
Suggests: knitr, rmarkdown, spelling, testthat (≥ 3.0.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
Config/roxygen2/version: 8.1.1
NeedsCompilation: no
Packaged: 2026-11-27 21:36:50 UTC; sam
Author: Shubham Dutta ORCID iD [aut, cre, cph]
Repository: CRAN
Date/Publication: 2026-11-27 21:50:02 UTC

tidyplate: Transform Microplate Data into Tibbles

Description

logo

The goal of 'tidyplate' is to help researchers convert different types of microplates into tibbles which can be used in data analysis. It accepts xlsx and csv files formatted in a specific way as input. It supports all types of standard microplate formats such as 6-well, 12-well, 24-well, 48-well, 96-well, 384-well, and, 1536-well plates.

logo

The goal of 'tidyplate' is to help researchers convert different types of microplates into tibbles which can be used in data analysis. It accepts xlsx and csv files formatted in a specific way as input. It supports all types of standard microplate formats such as 6-well, 12-well, 24-well, 48-well, 96-well, 384-well, and, 1536-well plates.

Author(s)

Maintainer: Shubham Dutta shubhamdutta26@gmail.com (ORCID) [copyright holder]

Authors:

See Also

Useful links:


Build a csv or xlsx template for each plate type

Description

build_plate() helps the user build an empty csv or xlsx file that can be used as a template for storing plate data. Ensure that plate names are unique. Once populated it can be used as an input for tidy_plate() function.

Usage

build_plate(
  plate_type = 6,
  n_plates = 1,
  plate_names = NULL,
  file = NULL,
  file_type = NULL
)

Arguments

plate_type

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

n_plates

A positive integer indicating the number of plates.

plate_names

A character vector of unique values that will be assigned to each plate. Its length should be equal to the value of n_plates.

file

A character string naming the file.

file_type

[Deprecated] A character string of the output file type. It can either be a csv or xlsx file. The default is csv.

Details

Validation errors identify invalid arguments and, where applicable, the plate-name position and planned output cell address.

Value

A csv or xlsx template file.

See Also

tidy_plate(), generate_plate()

Examples

temp_file <- tempfile(fileext = ".csv")

build_plate(plate_type = 6, n_plates = 2, file = temp_file)

Checks whether the input file is valid for use with the tidy_plate() function

Description

check_plate() performs quality checks on the input microwell shaped data and throws an error if there is any discrepancy. The user can either fix the input file or use the build_plate() function to build a template csv or xlsx file.

Usage

check_plate(file, well_id = "well", sheet = 1)

Arguments

file

A character string containing the path to a csv or excel file.

well_id

A character string that will be the name for the well id column.

sheet

If file type is xlsx this is the sheet name (character) or number (integer).

Details

Validation reports the first detected problem with file, plate and cell coordinates when available. Coordinates refer to the imported table.

Value

A message indicating whether the input file is compatible with the tidy_plate() function

See Also

build_plate()

Examples

file_path <- system.file(
  "extdata",
  "example_12_well.xlsx",
  package = "tidyplate"
)

check_plate(file = file_path)

Generates a microwell plate shaped csv or excel file from tibble or dataframe

Description

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.

Details

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

Value

A CSV or XLSX file, written to file.

See Also

tidy_plate(), build_plate()

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)

Reads and transforms microwell plate to a tibble

Description

tidy_plate() reads a microwell plate shaped csv or excel file and returns a tibble for downstream data analysis. In order to create an template file use the build_plate() function.

Usage

tidy_plate(file, well_id = "well", sheet = 1)

Arguments

file

A character string containing the path to a csv or excel file. The format is described below.

well_id

A character string that will be the name for the well id column.

sheet

A character or integer indicating the excel sheet to be read.

Details

Validation errors identify the first detected problem, with the input file, plate and cell coordinates when available. Coordinates refer to the imported table (A1 is its top-left cell).

Value

A tibble.

See Also

build_plate(), generate_plate()

Examples

file_path <- system.file("extdata", "example_12_well.xlsx",
  package = "tidyplate"
)

data_12 <- tidy_plate(file = file_path)

head(data_12)

Returns the name of each plate in the file

Description

view_plate_names() returns the names of all plates in the input file as a character vector. If names are empty or duplicated, it emits an informational message and returns the names. If both issues occur, it throws an error.

Usage

view_plate_names(file, sheet = 1)

Arguments

file

This is the path to an XLS, XLSX or CSV file containing data for the following types of plates: 6, 12, 24, 48, 96, 384, and 1536.

sheet

If file type is xlsx this is the sheet name (character) or number (integer).

Details

Name diagnostics identify the plate and imported cell address. Empty or duplicate names alone are informational; both together are an error.

Value

A character vector

Examples

file_path <- system.file("extdata", "example_12_well.xlsx", package = "tidyplate")

data_12 <- view_plate_names(file = file_path)

data_12