plot_eigenvectors() visualizes the dominant eigenvector(s) from running the S-map model on the community time series

plot_svd_vectors() visualizes the dominant SVD vector(s) from running the S-map model on the community time series

plot_eigenvectors(eigenvectors, num_values = 1, id_var = "censusdate",
  add_IPR = FALSE, palette_option = "plasma", line_size = 1,
  base_size = 16, plot_file = NULL, width = 6, height = NULL)

plot_svd_vectors(svd_vectors, num_values = 1, id_var = "censusdate",
  add_IPR = FALSE, palette_option = "plasma", line_size = 1,
  base_size = 16, plot_file = NULL, width = 6, height = NULL)

Arguments

eigenvectors

a list of matrices for the eigenvectors: the number of elements in the list corresponds to the time points of the s-map model, and each element is a matrix, where the columns are the eigenvectors, in descending order according to the eigenvalues

num_values

the number of eigenvectors to plot

id_var

when constructing the long-format tibble, what should be the variable name containing the time index

add_IPR

whether to also plot the Inverse Participation Ratio, a numerical quantity that measures how evenly the different components contribute to the eigenvector

palette_option

the color palette to use (see viridis::viridis() for more info)

line_size

the line width for the plot

base_size

the base font size

plot_file

the filepath to where to save the plot; if NULL (the default), then the plot is not saved to a file

width

width of the saved plot

height

height of the saved plot

svd_vectors

a list of matrices for the SVD vectors: the number of elements in the list corresponds to the time points of the s-map model, and each element is a matrix, where the columns are the the SVD vectors, in descending order according to the singular values

Value

A ggplot object of the plot