Description Usage Arguments Details Examples
This is based on the problem and solution outlined in my book on plot methods
(Condit, 1998). Each of N stakes i has an estimated height E[i]
and a true
height e[i]
.
Pairs of stakes have a height difference d[i, j]
, where
e[i] + d[i, j] = e[j]
, but only estimated height differences D[i, j]
are
known.
The least-squares estimate E[i]
of e[i]
can be written as the mean of the
n[i]
points j for which D[i, j]
was measured:
E[i] = mean(E[j] - D[i, j]) =
(1 / n[i]) * sum(E[j]) - (1 / n[i]) * sum(D[i, j])
, and
n[i] * E[i] - sum(E[j]) = -sum(D[i, j])
.
The latter produces N equations in N unknowns, but they are exactly singular.
One of the points must be assigned a value, and it's easiest to set
e[1] = 0
.
The effect is to exclude the equation for i = 0
, but all j for which
D[0, j]
was measured have unchanged equations (D[0, j]
are included).
The equations are written in matrix form. The coefficients are a matrix M
whose diagonal elements are the n[i]
, so M[i, i] = n[i]
for all i.
All other entries are -1
where D[i, j]
was measured otherwise zero.
The estimated E[i]
are a vector, and the vector V[i] = -sum(D[i, j])
,
where the summation is over j only. Then M *PERCENT* E = V
, Minv
is the
inverse of M, and E = Minv *PERCENT* V
.
1 2 | solve_topo(coldata, column1 = "pt1", column2 = "pt2",
diffcolumn = "htdiff", basept = "1", baseelev = 0, debug = NULL)
|
debug |
Logical. If TRUE, call browser to debug. |
In theory, the program will accept duplicate measures of the same pair of plots. They are treated as replicates with equal weight to all other estimates. There would be -2 or -3 etc. off the diagonal. The data are in columns. One column has the label of one stake (column header pt1), the second has the label of the second stake (column header pt2), and the final column has the height difference at pt2 minus pt1 (column header diff). The point labelled basept is assigned elevation baseelev. The last 5 arguments allow those column headers to be reassigned.
The name solve.topo clashed with an S3 method, so it was replaced by solve_topo.
1 2 3 4 | ## Not run:
# See topography tutorial
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.