rtimestamp_levels: Labels for timestamps

rtimestamp_levelsR Documentation

Labels for timestamps

Description

A dataset for arranging timestamps from PlateFlow tables such as PlateFlow_Biomek with rows ordered by order of step in processing. This allows factoring a "long-format" dataframe (timestamp names and values given in two columns) so that downstream plotting maintains correct processing order.

Also gives (suggested) labels, describing what has been done since previous timestamp.

Usage

rtimestamp_levels

Format

A tibble with 5 rows and 3 variables:

Level

Name of the corresponding RTimestamp column. Note that this column is not a factor (see details).

Label

An easily interpretable string describing what has happened since previous Level.

Hex

A hex color code (derived from a previously used palette). Colors of processing steps that are similar in nature (e.g. RNA extraction with liquid handling robots as opposed to rt-PCR and human interpretation of these results), and any potential future timestamp should most likely adhere to these "rules".

Details

It is (potentially) important to note that the column Level is not a factor. This is due to how joins work in dplyr; joining a (e.g. chr) vector with a factor removes levels from the resulting column despite the join method used.

To circumvent this, a target column (existing or new) can be made a factor by using the Level column for levels.

Examples

timestamps <- tibble::tibble(
  Timestamp = c(
    "RTimestampBKi7",
    "RTimestampPCR",
    "RTimestampPCRVV",
    "RTimestampPCRDV",
    "RTimestampPCRRes"
  ),
  Time = c(
    "1999",
    "Sunday Bloody Sunday",
    "9 to 5",
    "Yesterday",
    "Right Here Right Now"
  )
)

timestamps$Timestamp <- factor(timestamps$Timestamp,
                               levels = rtimestamp_levels$Level,
                               labels = rtimestamp_levels$Label)

timestamps


Testcenter-Danmark/tcdkhelper documentation built on March 18, 2022, 2:19 p.m.