Edit a Ring-Width Series

Description

Insert or delete rings from a ring-width series

Usage

1
2
3
4
5
insert.ring(rw.vec,rw.vec.yrs=as.numeric(names(rw.vec)),
            year,ring.value=mean(rw.vec,na.rm=TRUE),
            fix.last=TRUE)
delete.ring(rw.vec,rw.vec.yrs=as.numeric(names(rw.vec)),
            year,fix.last=TRUE)

Arguments

rw.vec

a vector of data

rw.vec.yrs

the years for rw.vec as names

year

the year to add or delete

ring.value

the value to add

fix.last

logical. If TRUE the last year of the series is fixed and the first year changes.

Details

Simple editing of ring widths.

Value

A named vector.

Author(s)

Andy Bunn. Patched and improved by Mikko Korpela.

See Also

dplR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(utils)
data(gp.rwl)
series <- gp.rwl$"50A"
names(series) <- rownames(gp.rwl)
series <- series[!is.na(series)]
series
insert.ring(rw.vec=series,year=1950,ring.value=0)
insert.ring(rw.vec=series,year=1950,ring.value=0,fix.last=FALSE)
delete.ring(rw.vec=series,year=1900)
delete.ring(rw.vec=series,year=1900,fix.last=FALSE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.