High, Low, Open, and Close Calculation

DESCRIPTION:

Calculate the high, low, first, and last elements of a vector, especially useful for financial trading data in conjunction with the aggregateSeries function.

USAGE:

hloc(x) 

REQUIRED ARGUMENTS:

x
vector to calculate high, low, open, and close for.

VALUE:

a vector with four elements: the maximum value in x, the minimum value in x, the first value of x, and the last value of x. x can be an array, but dimensions are ignored.

SEE ALSO:

.

EXAMPLES:

x <- c(5, 2, 3, 6, 3, 2, 1, 7, 1) 
hloc(x)