extract_hull | R Documentation |
extract_hull(
df,
x,
y,
group = NULL,
drop_outliers = FALSE,
output = c("df", "sf")
)
df |
Dataframe to extract shapes from. |
x |
Numeric variable. |
y |
Numeric variable. |
group |
Grouping variable for comparing shape of groups along x-y axes. |
drop_outliers |
Logical noting to remove outlier percentiles (< 5 \itemoutputCharacter – either 'df' or 'sf' – to return regular dataframe for use with 'geom_polygon()', or sf spatial object for use with 'geom_sf()'. Note that spatial output applies a smoothing process to the shapes. |
Dataframe of ellipses line shapes along NMDS1 and NMDS2. Extracts the shape of data from dataframes. Originally crafted around multidimensional scaling, but works well with any dataframe. data(iris) iris |> extract_hull(x = "Sepal.Width", y = "Sepal.Length", group = "Species", drop_outliers = TRUE, output = "sf") |> ggplot() + geom_sf(aes(col = Species), fill = NA) + theme_meow()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.