CountCycles: Generic ASTM Rainflow Cycle Counting

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/CountCycles.R

Description

Implements ASTM E1049-85 rainflow cycle counting to determine the amplitude and mean of each cycle within a vector (or time series) of alternating min/max local extrema.

Usage

1

Arguments

x

Object of class peaks (preferred for best results) or numeric.

Details

If x is class numeric, the vector should strictly alternate min/max. If it does not, CountCycles() will automatically remove any repeated min or max values and issue a warning.

Value

Object of type rainflow: a data frame with the number of cycles for each amplitude/mean combination.

Author(s)

Addison Klinke, agk38@case.edu

References

https://www.astm.org/Standards/E1049.htm

\insertRef

dowling_mechanical_2013rainflow

See Also

FindPeaks, CountCycles.numeric, CountCycles.peaks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# For class 'numeric' (example from ASTM E1049-85 Fig. 6)
astm <- c(-2, 1, -3, 5, -1, 3, -4, 4, -2) 
r <- CountCycles(astm)
summary(r)
plot(r)

# For class 'peaks' (using package weather data)
data(weather)
p <- FindPeaks(weather$temp, R = 1.1, smooth = TRUE, window = 120)
r <- CountCycles(p)
summary(r)
plot(r)

addisonklinke/rainflow documentation built on Aug. 23, 2020, 10:48 a.m.