minAreaRect
calculates the minimum area enclosing
rectangle that fits a set of 2D points.
minAreaRect(x, y)
A vector of x coordinates.
A vector of y coordinates of the same lenght as x
.
A list containing the height and width (in pixels) of the ellipse, the angle (in degrees) of its main axis with respect to the x axis, and the x and y coordinates of its center.
# NOT RUN {
minAreaRect(rnorm(100), rnorm(100))
# }
Run the code above in your browser using DataLab