Description Usage Arguments Details Value Examples

`convexHull`

Computes the area and centroid of the convex hull from the (latitute, longitude) vector.
It provides a plot of how the points are dispersed in the field of interest.

1 | ```
convexHull(X, varOfInterest)
``` |

`X` |
dataframe with two colums, latitute and longitude respectively. |

`varOfInterest` |
variable of interest to plot. This variable is needed to color the points on the convexhull. |

Consideration for this function:

It makes usage of chull from rgeos and Polygon from graphics.

The centroid of the polygon is calculated by averaging the vertices of it.

The shown plot uses the basic

`plot`

command.

A vector with two elements, the first element is the area and the second one is the centroid.
The centroid is a list of two elements, latitude and longitude that represents the centroid.
To have a visual idea of the returned object, it has the following shape *[area,[latitude,longitude], plotObject]*.

1 2 3 | ```
fileInput <- system.file("testdata", "chen.csv", package="Irescale")
data<-loadFile(fileInput)
area_centroid<-convexHull(data$data,data$varOfInterest)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.