declusR: Run the GSLIB 'declus' Program to Decluster Sample Data.

Description Usage Arguments Value Examples

Description

declusR calculates decluster weights for two or three-dimensional sample data using the CCG Fortran program declus. Cell declustering is used with optional offsets of the grid origin. The program automatically selects the decluster cell size from a range of deinfined sizes based on either the minimum or maximum declustered mean. Trimming limits are fixed to -1.0e21 and +1.0e21.

Usage

1
2
declusR(data, cols, yz_aniso = c(1, 1), min_max = 0L, cells = c(50,
  10, 400, 5), debug = FALSE)

Arguments

data

Data frame with coordinate and value fields.

cols

Character vector of column names in data: cols[1:2] names of numeric X and Y coordinate columns, respectively. cols[3] name of numeric Z coordinate column for three-dimensional sample data. For two-dimensional sample data leave out. cols[4] (or cols[3] for 2D) name of numeric grade/value column in data.

yz_aniso

Numeric vector of Y and Z cell dimension anisotropy factors. Y and Z cell size is determined by multiplying these factors and the X cell size. Default is 1, 1.

min_max

Scalar integer 0 or 1. When selecting the decluster cell size consider either the minimum mean (0) or the maximum mean (1). Default is 0.

cells

Numeric vector defining delcuster cells. 1 is number of cell size intervals to use in determining optimal cell size. 2 and 3 are minimum and maximum x-axis cell sizes to consider. 4 is is number of origin offsets for decluster grid. Default is [50, 10, 400, 5].

debug

Scalar boolean. If TRUE don't delete temporary system files. Default is FALSE.

Value

A list of three data frames: data contains the coordinates, value, and decluster weight; plot_data contains decluster cell sizes and means for plotting; and stats contains summary statistics associated with the declustering.

Examples

1
2
3
4
test2d <- declusR(samples_2d, c("x", "y", "value"), cells=c(100, 10, 100, 5))
# Plot the cell size versus the declustered mean.
plot(test2d$plot_data$cell_size, test2d$plot_data$mean)
abline(h=test2d$stats[test2d$stats$statistic == "naive mean",]$value, lty=2)

truemoid/rgslib documentation built on May 30, 2019, 2:14 p.m.