Learn R Programming

scan (version 0.20)

truncateSC: Truncate single-case data

Description

This function truncates data points at the beginning and / or end of both phases.

Usage

truncateSC(data, A = c(0,0), B = c(0,0))

Arguments

data

A single-case data frame or a list of single-case data frames. See makeSCDF to learn about this format.

A

A vector of two values defining the number of data points from phase A to be dropped (at the beginning and end). For lists of single-case data frames, the truncation is adapted to the length of the A phase for each single case.

B

A vector of two values defining the number of data points from phase B to be dropped (at the beginning and end). For lists of single-case data frames, the truncation is adapted to the length of the B phase for each single case.

Value

A truncated data frame (for each single-case).

See Also

outlierSC, fillmissingSC, makeSCDF

Examples

Run this code
# NOT RUN {
# Truncate the first two data points of both phases and compare the two data sets
truHeart <- truncateSC(byHeart2011[1], A = c(2,0), B = c(2,0))
plotSC(c(original = byHeart2011[1], selected = truHeart))
# }

Run the code above in your browser using DataLab