Learn R Programming

rioja (version 0.9-6)

read.Tilia: Read data in Tilia format

Description

Reads data in Tilia format used by the Tilia program for plotting stratigraphic diagrams.

Usage

read.Tilia(fName)

Arguments

fName
filename to read.

Value

  • Returns a list with three names elements:
  • datadata frame with species as columns and sites as rows. Column and row names are taken from the Tilia file.
  • varsnames and types of each variable in the dataset.
  • levelsnames depths, and optionally ages of each level in the core.

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 decimal places on import.

See Also

read.CEP.

Examples

Run this code
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")

Run the code above in your browser using DataLab