calculate_annual_distances {topolow} | R Documentation |
Calculate Annual Distance Metrics
Description
Calculates year-over-year antigenic distances and statistics. Compares each point to the mean coordinates of the previous year.
Usage
calculate_annual_distances(df_coords, ndim, na.rm = TRUE)
Arguments
df_coords |
Data frame containing: - V1...Vn coordinate columns - year: Numeric years - name: Point identifiers (will use rownames if missing) |
ndim |
Number of coordinate dimensions |
na.rm |
Logical indicating whether to remove NA values |
Value
A list containing year-over-year antigenic distance metrics:
dist_data |
A |
summary |
A list containing the |
Examples
# Create sample coordinate data
coords <- data.frame(V1 = rnorm(10), V2 = rnorm(10), year = rep(2000:2004, 2))
annual_stats <- calculate_annual_distances(coords, ndim=2)
print(annual_stats$summary$overall_mean)
[Package topolow version 1.0.0 Index]