dsp_motif: Creates heatmap for a geographic motif

Description Usage Arguments Value Examples

View source: R/dsp_motif.R

Description

Takes the motif fitted from ecos_fit and plots the theta component as a heatmap across space using suitable raster information.

Usage

1
2
3
4
5
6
7
8
9
dsp_motif(
  theta_mat,
  dsp_fld_res = 8,
  color_ramp = c("black", "darkseagreen3", "orange", "red"),
  raster_latlim = c(5, 50),
  raster_longlim = c(50, 120),
  outline_col = "white",
  proj = "+proj=longlat +ellps=WGS84"
)

Arguments

theta_mat

The theta output from the model fit from ecos_fit

dsp_fld_res

The resolution of the dispersion field.

color_ramp

Color palette to be used for the heat map.

raster_latlim

If disp_fld_list is a list of matrices, the latitudinal range of the dispersion fields must be provided as a vector.

raster_longlim

If disp_fld_list is a list of matrices, the longitudinal range of the dispersion fields must be provided as a vector.

outline_col

The outline color of the projected map.

proj

A character string of projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation. To be evaluated by sp::CRS(). default '+proj=longlat +ellps=WGS84'.

Value

Returns a heatmap plot, similar to the dsp_plot_map function for the theta matrix using the specified raster,

Examples

1
2
3
4
5
6
data("example_theta")
himalayan_geo_motifs <- dsp_motif(example_theta, 
                                 color_ramp = c("black", "darkseagreen3",
                                                "orange","red"),
                                dsp_fld_res = 8)
himalayan_geo_motifs$motif_maps[[1]]

kkdey/ecostructure documentation built on Jan. 26, 2021, 4:10 p.m.