read.Tilia: Read data in Tilia format

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/cep.r

Description

Reads data in old (*.til) Tilia format used by the Tilia program for plotting stratigraphic diagrams.

Usage

1
read.Tilia(fName, removeChron=FALSE)

Arguments

fName

filename to read.

removeChron

Remove chron variables from data, defaults to FALSE (chron vars will be include in sample list).

Details

read.Tila reads data in the Tilia format. Tilia is a program written by Eric Grimm to plot stratigraphic diagrams and is popular with palynologists. Note that any spaces or other illegal characters in the species codes will be converted to periods on import.

Value

Returns a list with three names elements:

data

data frame with species as columns and sites as rows. Column and row names are taken from the Tilia file.

vars

names and types of each variable in the dataset.

levels

names depths, and optionally ages of each level in the core.

Note

The code uses a combination of C and C++ and needs 1-byte structure alignment to read the Tilia binary file. It may crash some 64 bit versions of R.

See function read.tilia in the package neotoma for a version to read Tilia *.tlx files.

Author(s)

Steve Juggins

See Also

read.CEP.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
pth <- system.file("example.datasets/WOLSFELD.TIL", package="rioja")
WOLS <- read.Tilia(pth)
sel <- WOLS$vars$Sums == "A" | WOLS$vars$Sums == "B"
spec <- WOLS$data[, sel]
totals <- apply(spec, 1, sum)
spec.pc <- spec / totals * 100
mx <- apply(spec.pc, 2, max)
spec.sub <- spec.pc[, mx > 5]
age <- WOLS$levels$Chron2
strat.plot(spec.sub, scale.percent=TRUE, yvar=age, y.rev=TRUE,
      wa.order="bottomleft")

## End(Not run)

rioja documentation built on June 20, 2017, 9:10 a.m.

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