add_edge_variable: Add edge variable to coordinate data.frame

add_edge_variableR Documentation

Add edge variable to coordinate data.frame

Description

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.

Usage

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")


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.