read.crn: Read Tucson Format Chronology File

Description Usage Arguments Details Value Author(s)

Description

This function reads in a Tucson (decadal) format file of tree-ring chronologies (.crn).

Usage

1
read.crn(fname, header = NULL, encoding = getOption("encoding"))

Arguments

fname

a character vector giving the file name of the crn file.

header

logical flag indicating whether the file has a header. If NULL then the function will attempt to determine if a header exists

encoding

the name of the encoding to be used when reading the crn file. Usually the default value will work, but a crn file written in a non-default encoding may crash the function. In that case, identifying the encoding and specifying it here should fix the problem. Examples of popular encodings available on many systems are "ASCII", "UTF-8", and "latin1" alias "ISO-8859-1". See the help of file.

Details

This reads in a standard crn file as defined according to the standards of the ITRDB at http://www.ncdc.noaa.gov/paleo/treeinfo.html. Despite the standards at the ITRDB, this occasionally fails due to formatting problems.

Value

A data.frame with each chronology in columns and the years as rows. The chronology IDs are the column names and the years are the row names. If the file includes sample depth that is included as the last column (samp.depth). The output class is class "crn" and "data.frame"

Author(s)

Andy Bunn. Patched and improved by Mikko Korpela.



Search within the dplR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.