gp_sec | R Documentation |
gp
object.Add a section to a gp
object.
gp_sec(gp, ...)
## S3 method for class 'gp'
gp_sec(
gp,
name,
nrow = NULL,
ncol = NULL,
labels = NULL,
start_corner = c("tl", "tr", "bl", "br"),
flow = c("row", "col"),
margin = 0,
wrap = FALSE,
break_sections = TRUE,
advance = TRUE
)
gp |
A |
name |
Character. Name of the section. |
nrow |
Numeric. Section height. If |
ncol |
Numeric. Section width. If |
labels |
Optional. What should the labels of each section be? |
start_corner |
Corner of section to place first item. |
flow |
Direction that subsequent items should be placed relative to first corner. |
margin |
Border width outside the section that will be unfilled. Can take an argument of one (same border all around), two (top/bottom, left/right), three (top, left/right, bottom), or four (top, right, bottom, left). |
wrap |
Should the sections that go off the edge continue on the next row/column? |
break_sections |
Should partial sections be allowed? |
advance |
Should this section be a child or sibling of the one before it? If TRUE (default), it will be a child. |
a gp
gp(16, 24) |> gp_sec("section 1", ncol = 3)
pq <- gp(8, 12, protein_quant) |> gp_sec("has_sample", 3, 19, wrap = TRUE, labels = "sample")
# Sections can be used to label things for tidying
pq |> gp_serve()
# They can also be used for plotting:
pq |> gp_plot(has_sample)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.