Adds a variable called edge to the input data.frame that tells if the observation belongs to the points that lie on the edge of the covered area.

add_edge_variable(coords_df, id_var = "barcodes")

Arguments

id_var

Character. Variable that identifies each observation.

input_df

A data.frame with two numeric variables called x and y and a variable as denoted in id_var.

Value

Input data.frame with additional logical variable edge.

Examples


library(SPATA2)

data("example_data")

object <- example_data$object_UKF275T_diet

coords_df <-
 getCoordsDf(object) %>%
 add_edge_variable()

plotSurface(coords_df, color_by = "edge")