ublkavgR: Scale Grid Size Up or Down Using 'ublkavg'.

Description Usage Arguments Details Value

Description

Scale Grid Size Up or Down Using ublkavg.

Usage

1
2
3
ublkavgR(data, vars, domain = NULL, xyz = c("x", "y"),
  weights = NULL, factor = 2, minfrac = 1e-05, avg_method = 0,
  append_frac = FALSE, indims = c(1, 1, 1))

Arguments

data

Data frame containing x, y, and, optionally z coordinates and one or more fields to average or assign by dominance.

vars

Character vecotr of variables to average or assign by dominance.

domain

Character vector for domain field to assign by dominance.

xyz

Character vector of coordinate field names.

weights

Charcater vector of weighting field name(s).If one field it is applied to all fields except domain.

factor

Numeric positive number: multiplicative factor to scale grid.

minfrac

Minimimum fraction of upscaled grid node that is represented by the input grid.

avg_method

Integer vector of averaging methods to use: 0 = arithmetic mean; 1 = geometric mean; 2 = harmonic mean; 3 = majority rules (for categorical variables)

append_frac

Scalar boolean: append fraction field to output.

indims

Numeric vector of grid dimensions for input grid.

Details

There is currently an issue with the implimentation of the domain argument. It is supposed to produce a variable 0 to 1 in the output grid, which is the average of a domain indicator. It current gives wrong result and I am not sure if it is this implimentation of the Fortran program at fault.

Value

Data frame of re-scaled grid.


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