union_JamPolygon: Union one or more JamPolygon objects

union_JamPolygonR Documentation

Union one or more JamPolygon objects

Description

Union one or more JamPolygon objects

Usage

union_JamPolygon(jp, new_name = NULL, verbose = FALSE, ...)

Arguments

jp

JamPolygon

new_name

character string to define optional names(jp) of the output. Otherwise it uses the first name in jp.

verbose

logical indicating whether to print verbose output.

...

additional arguments are ignored.

Value

JamPolygon after applying the union

See Also

Other JamPolygon: JamPolygon-class, Venndir-class, [,JamPolygon,ANY,ANY,ANY-method, add_orientation_JamPolygon(), area_JamPolygon(), bbox_JamPolygon(), buffer_JamPolygon(), check_JamPolygon(), check_Venndir(), eulerr_to_JamPolygon(), farthest_point_JamPolygon(), find_venn_overlaps_JamPolygon(), has_point_in_JamPolygon(), intersect_JamPolygon(), label_fill_JamPolygon(), label_outside_JamPolygon(), label_segment_JamPolygon(), labelr_JamPolygon(), minus_JamPolygon(), nearest_point_JamPolygon(), nudge_JamPolygon(), plot.JamPolygon(), point_in_JamPolygon(), polyclip_to_JamPolygon(), polygon_circles(), polygon_ellipses(), sample_JamPolygon(), split_JamPolygon(), update_JamPolygon()

Examples

df3 <- data.frame(name=c("polygon1", "polygon2"),
   label=c("polygon1", "polygon2"),
   x=I(list(
      list(c(1, 6, 6, 1),
         c(2, 5, 5, 2),
         c(3, 4, 4, 3)),
      list(#c(11, 16, 16, 11),
         c(12, 15, 15, 12),
         c(13, 14, 14, 13))
      )),
   y=I(list(
      list(c(1, 1, 6, 6),
         c(2, 2, 5, 5),
         c(3, 3, 4, 4)),
      list(#c(1, 1, 6, 6),
         c(2, 2, 5, 5),
         c(3, 3, 4, 4))
      )),
   fill=c("gold", "firebrick"))
jp3 <- new("JamPolygon", polygons=df3);
plot(jp3);

jp3b <- union_JamPolygon(jp3, new_name="polygons 1,2")
plot(jp3b)

# test empty polygon
jp3na <- jp3;
jp3na@polygons[2, "x"] <- I(list(NA))
jp3na@polygons[2, "y"] <- I(list(NA))
jp3na
union_JamPolygon(jp3na[1,])
union_JamPolygon(jp3na)


jmw86069/venndir documentation built on Nov. 14, 2024, 10:12 a.m.