fill.matrix: Relace elements of a matrix

Description Usage Arguments Value Note

View source: R/fill.matrix.R

Description

Replace (fill) elements of a matrix (or data.frame) with a value for given pairs of row and column indices.

Usage

1
fill.matrix(outcome, x, rownr, dalknr)

Arguments

outcome

Input matrix/data.frame

x

Value or values to replace/fill with

rownr

Row index/indices

dalknr

Column index/indices

Value

Matrix or data.frame with given values replaced.

Note

Probably redundant, not called by any geo-function, the same effect could be achieved with an assignment to a matrix with an index-matrix of the values in rownr and dalknr: mat[matrix(c(rownr, dalknr), ncol = 2)] <- x


geo documentation built on May 29, 2017, 5:36 p.m.