db.stat.grid {RGeostats}R Documentation

Statistics for a set of variables on a grid

Description

Calculate the statistics for a set of variables in the cells of a Grid

Usage

db.stat.grid(db, dbgrid, fun = "mean", names = db.getname(db,"z",1),
  	     radius=0, radix="Stats", modify.target=db.locmod())

Arguments

db

The db-class structure where the variables are read. This data base must contain at least one Z-variable defined (except when fun = "num").

dbgrid

The db-class Grid structure where the statistics are stored

fun

The code giving the operation that must be performed between the variables at the same point:

  • "num" : Number of valid samples

  • "mean" : Mean over the valid samples

  • "var" : Variance over the valid samples

  • "stdv" : Standard deviation over the valid samples

  • "mini" : Minimum over the valid samples

  • "maxi" : Maximum over the valid samples

  • "med" : Median over the valid samples

  • "plus" : Number of positive values

  • "moins" : Number of negative values

  • "zero" : Number of zero values

names

List of names of attributes to be processed. For more information see db.ident.

radius

Dimension of the neighborhood radius (given in number of cells). If the radius is 0 (default value), the value of a cell is the 'operation' performed on the population of samples belonging to that cell. If the radius is 1, the 'operation' is performed on the central cell as well as the surrounding cells of rank 1 in all space dimension.

radix

Radix of the name given to the variable containing the statistics

modify.target

Decides whether or not the newly created variables will have their locator defined or not. For more information, see db.locmod.

Value

To each variable belonging to the input Db, corresponds a variable in the output Grid Db containing the calculated statistics.

See Also

db-class


[Package RGeostats version 14.0.10 Index]