quick.prevR: Quick prevR analysis and plot

View source: R/quick.prevR.r

quick.prevRR Documentation

Quick prevR analysis and plot

Description

This function performs several analysis in one go: (i) apply rings(); (ii) compute prevalence surface with kde(); (iii) compute the surface of rings radii with krige(); (iv) plot prevalence surface using prevR.colors.red() and add rings radii as a contour plot.

Usage

quick.prevR(
  object,
  N = Noptim(object),
  nb.cells = 100,
  cell.size = NULL,
  weighted = NULL,
  plot.results = TRUE,
  return.results = FALSE,
  return.plot = FALSE,
  legend.title = "%",
  cex = 0.7,
  progression = TRUE
)

Arguments

object

object of class prevR.

N

integer or list of integers corresponding to the rings to use.

nb.cells

number of cells on the longest side of the studied area (unused if cell.size is defined).

cell.size

size of each cell (in the unit of the projection).

weighted

use weighted data (TRUE, FALSE or "2")?

plot.results

plot the results?

return.results

return the results?

return.plot

return the plot within the results?

legend.title

title of the legend

cex

to control the text size on the graph

progression

show a progress bar?

Details

N determine the rings to use for the estimation. By default, a suggested value of N will be computed with Noptim().

Value

A list of one or several elements, depending on the arguments: (i) prev is a SpatialPixelsDataFrame containing the prevalence surface; (ii) radius a SpatialPixelsDataFrame containing the kriged surface of the rings radii; (iii) plot a ggplot graph.

See Also

Noptim(), rings(), kde() and krige().

Examples

## Not run: 
quick.prevR(fdhs)

## End(Not run)


larmarange/prevR documentation built on May 18, 2023, 3:50 a.m.