quick.prevR: Quick prevR analysis and plot

Description Usage Arguments Details Value See Also Examples

View source: R/quick.prevR.r

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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 longuest 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

1
2
3
4
## Not run: 
  quick.prevR(fdhs)

## End(Not run)

prevR documentation built on Aug. 28, 2020, 5:08 p.m.