plot.CGdata {ECG}R Documentation

Plots a CGdata object

Description

Creates a plot of a series of single observations.

Usage

## S3 method for class 'CGdata'
plot(x, from=x$input$from, to=x$input$to, xlab = expression(nu(cm^-1)),
 ylab = "Transmittance", add = FALSE, verbose = FALSE, ...)

Arguments

x

a CGdata object

from

lower limit point on the predictor value to be plotted

to

upper limit point on the predictor value to be plotted

xlab

a string or expression with the label for the x axis

ylab

a string or expression with the label for the y axis

add

a logical value, if true then the plot is added to an existing one, otherwise it creates a new plot

verbose

a logical value, if true then the plot displays intermediate steps to estimate the extreme point located between the from and to values

...

additional parameters

Value

No return value, called for graphical display side effects

Author(s)

H. Gasca-Aragon

See Also

See Also as CGdata, print.CGdata

Examples

require(ECG)

N<- 1000

set.seed(12345)
d1<- 1-sin(seq(1:(5/2*N))/N*pi-pi*3/4)+rnorm(5/2*N, 0, 0.01)
dat<- data.frame(x=1:length(d1), 
	y=100*(d1-min(d1))/(max(d1)-min(d1)))

CGres<- CGdata(dat)


plot(CGres, min(dat$x), max(dat$x), verbose = TRUE)



[Package ECG version 0.5.2 Index]