well_to_index: Converts Well ID to a Numeric Index

View source: R/well.R

well_to_indexR Documentation

Converts Well ID to a Numeric Index

Description

Indexes along rows first, so A12 is index 12 and B01 is index 13 for a 96 well plate.

Usage

well_to_index(x, plate = 96, colwise = FALSE)

Arguments

x

string well ID

plate

size of the plate. One of c(6, 12, 24, 96, 384)

colwise

if TRUE, index instead down the columns, so H01 is index 8, A12 is index 89 and B01 is index 2 for a 96 well plate.

Value

numeric well index.

Examples


# indexing along the row first
well_to_index(c("A10", "c3", "h12"))
well_to_index("H08")
well_to_index("h8")
well_to_index("C20")

# indexing instead down the column first
well_to_index(c("A10", "c3", "h12"), colwise = TRUE)
well_to_index("H08", colwise = TRUE)
well_to_index("h8", colwise = TRUE)
well_to_index("C20", colwise = TRUE)

rforbiochemists/wellr documentation built on March 28, 2024, 4:26 a.m.