Learn R Programming

strvalidator (version 0.3.0)

dyeToColor: Convert dye letter to color name.

Description

dyeToColor converts dye letters used in forensic DNA typing kits to color names in R.

Usage

dyeToColor(data)

Arguments

data
data frame containing a 'Dye' column.

Value

  • data.frame with additional column 'Color'.

Details

Primers in forensic STR typing kits are labelled with a fluorescent dye. The dyes are represented with single letters in exported result files. For visualisation in R these are matched to R color names.

Examples

Run this code
# Some common designation for fluorescent dyes.
dyes <- data.frame(Dye=c("B","B","B","G","G","Y","R","R"))
# Get corresponding R colors.
colors <- dyeToColor(data=dyes)

Run the code above in your browser using DataLab