Union one or more JamPolygon objects
union_JamPolygon(jp, new_name = NULL, verbose = FALSE, ...)
JamPolygon
character
string to define optional names(jp)
of
the output. Otherwise it uses the first name in jp
.
logical
indicating whether to print verbose output.
additional arguments are ignored.
JamPolygon
after applying the union
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()
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
#> An object of class "JamPolygon"
#> Slot "polygons":
#> name label x y fill
#> 1 polygon1 polygon1 c(1, 6, .... c(1, 1, .... gold
#> 2 polygon2 polygon2 NA NA firebrick
#>
union_JamPolygon(jp3na[1,])
#> An object of class "JamPolygon"
#> Slot "polygons":
#> name label x y fill
#> 1 polygon1 polygon1 c(1, 6, .... c(1, 1, .... gold
#>
union_JamPolygon(jp3na)
#> An object of class "JamPolygon"
#> Slot "polygons":
#> name label x y fill
#> 1 polygon1 polygon1 c(1, 6, .... c(1, 1, .... gold
#>