JamPolygon-methods: Subset JamPolygon object

[,JamPolygon,ANY,ANY,ANY-methodR Documentation

Subset JamPolygon object

Description

Plot JamPolygon object

Combine multiple JamPolygon objects, given two JamPolygon or multiple objects in a list.

Usage

## S4 method for signature 'JamPolygon,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'JamPolygon,missing'
plot(x, y, ...)

rbind2.JamPolygon(x, y, ...)

## S4 method for signature 'JamPolygon,ANY'
rbind2(x, y, ...)

Arguments

x, y

JamPolygon object

...

additional JamPolygon objects if present

Details

This function is intended to support input as rbind2(list(JamPolygons)) or do.call(rbind2.JamPolygon, list(JamPolygons)) with any combination of one or more JamPolygon objects.

Value

JamPolygon object, invisibly.

See Also

Other JamPolygon: JamPolygon-class, Venndir-class, 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(), union_JamPolygon(), update_JamPolygon()

Other JamPolygon: JamPolygon-class, Venndir-class, 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(), union_JamPolygon(), update_JamPolygon()

Examples

dfx <- data.frame(name=c("polygon1", "polygon2"),
   x=I(list(
      list(c(1, 4, 4, 1),
         c(2, 3, 3, 2)),
      c(5, 6, 6, 5))),
   y=I(list(
      list(c(1, 1, 4, 4),
         c(2, 2, 3, 3)),
      c(1, 1, 2, 2))),
   fill=c("gold", "firebrick"))
jpx <- new("JamPolygon", polygons=dfx);
plot(jpx);

dfz <- data.frame(name=c("polygon1", "polygon2", "polygon3"),
   x=I(list(
      list(c(1, 4, 4, 1),
         c(2, 3, 3, 2)),
      list(c(4.5, 6.5, 6.5, 4.5),
         c(5, 6, 6, 5)),
      list(c(1, 4, 4, 1),
         c(2, 3, 3, 2),
         c(5, 6, 6, 5)))),
   y=I(list(
      list(c(1, 1, 4, 4),
         c(2, 2, 3, 3)),
      list(c(1, 1, 3, 3),
         c(3, 3, 4, 4)+0.5),
      list(c(5, 5, 8, 8),
         c(6, 6, 7, 7),
         c(6, 6, 7, 7)))),
   fill=c("gold", "firebrick", "dodgerblue"));
jpz <- new("JamPolygon", polygons=dfz);
jpz@polygons[, c("label_x", "label_y")] <- as.data.frame(labelr_JamPolygon(jpz))
jpz@polygons$border <- c("orange", "gold", "purple");
jpz@polygons$border.lwd <- c(3, 4, 5);
jpz <- add_orientation_JamPolygon(jpz);
plot(jpz);


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