Learn R Programming

gcxgclab (version 1.1.0)

plot_chr: Plot chromatogram

Description

plot_chr plots TIC data for chromatogram.

Usage

plot_chr(
  data,
  scale = "log",
  dim = 2,
  floor = -1,
  title = "Intensity",
  xlab = "retention time 1",
  ylab = "retention time 2"
)

Value

A ggplot object. A contour plot of TIC data plotted in two dimensional retention time.

Arguments

data

a list object. Data extracted from a cdf file, ideally the output from extract_data().

scale

a string object. Either 'linear' or 'log'. log refers to logarithm base 10. Default is log scale.

dim

a integer object. The time dimensions of the plot, either 1 or 2. Default is 2.

floor

a float object. The floor value for plotting. Values below floor will be scaled up. Default for linear plotting is 0, default for log plotting is 10^3.

title

a string object. Title placed at the top of the plot. Default title "Intensity".

xlab

a string object. Label for the x axis. Default is "retention time 1".

ylab

a string object. Label for the y axis. Default is "retention time 2".

Details

This function creates a contour plot using of TIC data vs the x and y retention times using ggplot from ggplot2 package ggplot2gcxgclab.

References

Examples

Run this code
file <- system.file("extdata","sample1.cdf",package="gcxgclab")
frame <- extract_data(file,mod_t=.5)
plot_chr(frame, title='Raw Data', scale="linear")
plot_chr(frame, title='Log Intensity')

Run the code above in your browser using DataLab