Skip to contents

Extracts the harmonic extension results as a data frame suitable for downstream analysis.

Usage

# S3 method for class 'harmonic_extension'
as.data.frame(
  x,
  row.names = NULL,
  optional = FALSE,
  y = NULL,
  density = NULL,
  ...
)

Arguments

x

A harmonic_extension object.

row.names

Ignored (for S3 method compatibility).

optional

Ignored (for S3 method compatibility).

y

Optional numeric vector of response values (e.g., fitted values).

density

Optional numeric vector of density values.

...

Additional arguments (ignored).

Value

A data frame with columns:

vertex

Vertex index (1-based)

coord

Extended coordinate in \([0, 1]\)

hop.dist

Hop distance from trajectory

geo.dist

Geodesic distance from trajectory

nearest.traj.vertex

Nearest trajectory vertex (1-based)

on.trajectory

Logical; TRUE if vertex is on the trajectory

y

Response value (if provided)

density

Density value (if provided)