fill.matrix: Relace elements of a matrix

Description Usage Arguments Value Note

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


einarhjorleifsson/fjolst2 documentation built on May 16, 2019, 1:27 a.m.