Define a polygon hull to encompass a set of data points
points2polygonHull(x, returnClass = c("matrix", "SpatialPolygons"), ...)two-column numeric matrix of data points, or an object of
class sp::SpatialPoints.
character string indicating the class to return,
either "matrix" to return a two-column numeric matrix, or
"SpatialPolygons" to return sp::SpatialPolygons.
logical whether to print verbose output.
A two-column numeric matrix of polygon coordinates when
returnClass="matrix" by default, or when
returnClass="SpatialPolygons" it returns an object
of class sp::SpatialPolygons.
A polygon hull can be useful as a visual indicator of the location
of a set of points. This function creates a polygon around all points,
and not just the most dense region of points, using
grDevices::chull().
The output is slightly modified to duplicate the first coordinate,
in order to "close" the resulting polygon, which is consistent
with the output of rgeos::gConvexHull().
Other jam utility functions:
blockArrowMargin(),
find_colname(),
fold_to_log2fold(),
get_se_assaydata(),
gradient_rect(),
handle_highlightPoints(),
log2fold_to_fold(),
logAxis(),
outer_legend(),
update_function_params(),
update_list_elements()