HR.plot: Plot heart rate data

Description Usage Arguments Examples

View source: R/HR.plot.R

Description

Specialized plot for temperature dependend maximum heart rate data. Every data point is plotted as a dot with standard error bars. Dots are connected by solid line but as soon as the number of samples represented by the dat gets below the cutoff, the connective line is dashed.

Usage

1
2
3
4
5
6
HR.plot(data, groups, xlabels = colnames(data), dodge = 0.03,
  sig.marks = T, xlim = "", ylim = "", cex = 2, col = "", pch = 16,
  err.bar.col = T, xlab = "degrees C", ylab = "maximum heart rate (bpm)",
  length = 0.02, lwd = 1, lwd.err = 1, main = F, las.x = 1,
  las.y = 2, legend.pos = "bottomright", legend = TRUE, bg.grid = T,
  at = "", cutoff = 0.5, leg.labels = "")

Arguments

data

data matrix, numbers or NAs only, samples in lines, one column per measurement step.

groups

group vector (must have same length as rows in data)

xlabels

labels for the x-axis

dodge

add a dodge on xaxis for groups

sig.marks

if TRUE (default) grey rectangle and asterisks are added to the background of the plot to mark significant differences in groups according to ANOVA (*: p<0.05, **: p<0.01)

xlim

define own xlim

ylim

define own ylim

cex

scaling of data points

col

color vector. If insufficient number of colors is given black to grey colors are used.

pch

defines dot style. Can be a vector with length = number of groups

err.bar.col

if TRUE (default), error bars will be drawn in same color as group colors. Otherwise in black

xlab

label of x-axis

ylab

label of y-axis

length

length of error bar heads

lwd

line width of dot connectors

lwd.err

line width of error bars

main

title of plot. Default is FALSE = no title

las.x

text orientation for x-axis labels (1=horizontal, 2=vertical)

las.y

text orientation for y-axis (2=horizontal, 1=vertical)

legend.pos

position of legend

legend

if TRUE, a legend will be added to the plot

bg.grid

if TRUE, a background grid will be drawn

at

define order of the groups and positioning for the legend labels

cutoff

percentage of samples needed for draing a solid line, less samples will be drawn with a dashed line.

leg.labels

vector containing the labels for the legend

Examples

1
2
HR.plot(hr.only, hr.data$group, col=c("blue","red"))
HR.plot(hr.only, paste(hr.data$group, hr.data$rank), col=c("lightblue","orange","blue","red"))

gtimmerhaus/aquaR documentation built on May 17, 2019, 8:57 a.m.