generate_antigenic_map | R Documentation |
Fits a smoothing spline through a set of antigenic coordinates, and uses this to predict antigenic coordinates for all potential infection time points
generate_antigenic_map(antigenic_distances, buckets = 1, spar = 0.3)
antigenic_distances |
a data frame of antigenic coordinates, with columns labelled X, Y and Strain for x coord, y coord and Strain label respectively. Strain labels should be in the virus_key vector which is at the top of this source code. See |
buckets |
the number of epochs per year. 1 means that each year has 1 strain; 12 means that each year has 12 strains (monthly resolution) |
spar |
to be passed to smooth.spline |
a fitted antigenic map
generate_antigenic_map_flexible
Other antigenic_maps:
generate_antigenic_map_flexible()
## Not run:
antigenic_coords_path <- system.file("extdata", "fonville_map_approx.csv", package = "serosolver")
antigenic_coords <- read.csv(antigenic_coords_path, stringsAsFactors=FALSE)
antigenic_map <- generate_antigenic_map(antigenic_coords, 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.