trim.data {BBEST}R Documentation

Truncate data

Description

The function truncates the data (deletes low- and high-x information).

Usage

trim.data(data, x.min, x.max)

Arguments

data

an object of type data. See set.data for details.

x.min, x.max

numeric values determining the region to keep.

Details

Frequently, the experimental data need to be truncated to remove unwanted ranges.

Value

an object of type data with all functions cropped to the region [x.min, x.max]

Examples

# prepare data
x <- seq(0, 50, 0.01)
y <- .8*exp(-x)*x^4 
dat <- list(x=x, y=y)
# truncate
dat <- trim.data(dat, 1, 25)
# plot results
plot(x,y,t="l",lwd=4, col=4)
lines(dat$x, dat$y, lwd=4, col=2)
legend(15,3,c("initial", "truncated"), lty=1, col=c(4,2))

[Package BBEST version 0.1-8 Index]