hloc | R Documentation |
Calculates the high, low, first, and last elements of a vector.
Especially useful for financial trading data in conjunction with
the aggregateSeries
function.
hloc(x)
x |
a vector for which to calculate high, low, open, and close. |
returns a vector with four elements:
high |
the maximum value in |
low |
the minimum value in |
open |
the first value of |
close |
the last value of |
x
can be an array, but dimensions are ignored.
aggregateSeries
.
x <- c(5, 2, 3, 6, 3, 2, 1, 7, 1)
hloc(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.