as.linseg: Coerce to linear segment object

Description Usage Arguments Value Examples

Description

Takes a data.frame with top/bottom/segment name information and returns a linseg object.

Usage

1
as.linseg(x, top = "top", bottom = "bottom", names = "name", name = NA)

Arguments

x

A data.frame with top/bottom/segment name columns

top

The name of the colunn containing the tops (as a string)

bottom

The name of the column containing the bottom (as a string)

names

The name of the column containing the names (as a string)

name

The name associated with the linear segments (optional)

Value

A linseg object.

Examples

1
2
3
4
5
zonesdf <- data.frame(unit_top=c(0, 2, 4, 6, 8),
                      unit_bottom=c(2, 4, 6, 8, 10),
                      unit_name=c("Unit 1", "Unit 2", "Unit 3", "Unit 4", "Unit 5"),
                      unit_litho=c("sand", "silt", "clay", "sand", "clay"))
lsobj <- as.linseg(zonesdf, top="unit_top", bottom="unit_bottom", names="unit_name")

paleolimbot/ofcores documentation built on May 24, 2019, 6:13 p.m.