Skip to contents

Usage

functionalsampling(
  data,
  x_coord,
  y_coord,
  event_type,
  rare_event = "Rare",
  frequency_threshold = 5,
  calculate_nnd = TRUE,
  test_randomness = TRUE,
  analyze_neighborhoods = TRUE,
  show_summary = TRUE,
  show_plot = TRUE,
  show_methodology = TRUE,
  show_references = FALSE,
  significance_level = 0.05
)

Arguments

data

.

x_coord

X spatial coordinate of events/cells.

y_coord

Y spatial coordinate of events/cells.

event_type

Type of event or cell. Used to identify rare events vs majority population.

rare_event

Label identifying the rare event/cell type in the event_type variable.

frequency_threshold

Maximum frequency to consider an event as "rare" (default 5\

calculate_nndCalculate distances between each rare event and its nearest neighbor.

test_randomnessTest if rare events are randomly distributed (Clark-Evans test).

analyze_neighborhoodsTest if rare events have consistent distances to neighboring cells (catalyst function indicator).

show_summary.

show_plot.

show_methodology.

show_references.

significance_level.

A results object containing:

results$summarya table
results$nnd_tablea table
results$randomness_testa table
results$functional_assessmenta table
results$plotan image
results$methodologya html
results$referencesa html
Tables can be converted to data frames with asDF or as.data.frame. For example:results$summary$asDFas.data.frame(results$summary) Functional Sampling - Rare Event Analysis