createGiottoPolygonsFromDfr | R Documentation |
Creates Giotto polygon object from a structured dataframe-like object. Three of the columns should correspond to x/y vertices and the polygon ID. Additional columns are set as attributes
createGiottoPolygonsFromDfr(
segmdfr,
name = "cell",
calc_centroids = FALSE,
verbose = TRUE,
skip_eval_dfr = FALSE,
copy_dt = TRUE
)
segmdfr |
data.frame-like object with polygon coordinate information (x, y, poly_ID) with x and y being vertex information for the polygon referenced by poly_ID. See details for how columns are selected for coordinate and ID information. |
name |
name for the |
calc_centroids |
(default FALSE) calculate centroids for polygons |
verbose |
be verbose |
skip_eval_dfr |
(default FALSE) skip evaluation of provided dataframe |
copy_dt |
(default TRUE) if segmdfr is provided as dt, this determines whether a copy is made |
When determining which column within the tabular data is intended to provide polygon information, Giotto first checks the column names for 'x', 'y', and 'poly_ID'. If any of these are discovered, they are directly selected. If this is not discovered then Giotto checks the data type of the columns and selects the first ''character'‘ type column to be ’poly_ID' and the first two ''numeric'' columns as 'x' and 'y' respectively. If this is also unsuccessful then poly_ID defaults to the 3rd column. 'x' and 'y' then default to the 1st and 2nd columns.
giotto polygon object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.