Description Usage Arguments Value Author(s) See Also Examples
This function truncates data points at the beginning and / or end each phase.
1 2 3 4 5 6 7 |
data |
A single-case data frame. See |
dvar |
Character string with the name of the dependent variable. Defaults to the attributes in the scdf file. |
pvar |
Character string with the name of the phase variable. Defaults to the attributes in the scdf file. |
truncate |
A list with a vector of two (beginning and end) values for each phase defining the number of data points to be deleted. For lists of single-case data frames, the truncation is adapted to the length of each phase for each single case. |
na |
If FALSE, the truncated measurement times are deletet. If TRUE, NAs are set for the dependent variable. |
A truncated data frame (for each single-case).
Juergen Wilbert
Other data manipulation functions:
fillmissingSC()
,
longSCDF()
,
outlierSC()
,
rankSC()
,
scaleSC()
,
shiftSC()
,
smoothSC()
1 2 3 4 5 6 | # Truncate the first two data points of both phases and compare the two data sets
study <- c(
"Original" = byHeart2011[1],
"Selected" = truncateSC(byHeart2011[1], truncate = list(A = c(2,0), B = c(2,0)))
)
plot(study)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.