data.frame
.read.ids(rwl, stc = c(3, 2, 3))
stc[1]
), the tree IDs (stc[2]
),
and the core ID<data.frame
with column one named "tree"
giving a
numeric
ID for each tree and column two named
"core"
giving a numeric
ID for each core. The
original series IDs are copied from rwl as rownames. The
order of the rows in the output matches the order of the series in
rwl
.stc
tells how each series separate into site,
tree, and core IDs. For instance a series code might be
"ABC011"
indicating site "ABC"
, tree 1, core 1. If this
format is consistent then the stc
mask would be
c(3, 2, 3)
allowing up to three characters for the core
ID (i.e., pad to the right). If it is not possible to
define the scheme (and often it is not possible to machine read
IDs), then the output data.frame
can be built
manually. See below for format.
The function attempts to convert the tree and core substrings to
integer
s. When this succeeds, the converted values are copied
to the output without modification. When non-integral substrings are
observed, each unique tree substring is assigned an integral value in
the range 1 to n, where n is the number of unique tree
substrings. The same applies to cores within a tree. Substrings are
sorted before assigning the numeric
IDs.
The order of columns in rwl
does not affect the tree and
core IDs assigned to each series.rwi.stats
, read.rwl
data(ca533)
read.ids(ca533, stc = c(3, 2, 3))
Run the code above in your browser using DataLab