Learn R Programming

paleofire (version 1.2.4)

pfExtract: Extract charcoal data for a list of sites

Description

Extract charcoal data from an object returned by pfSiteSel

Usage

pfExtract(ID)

Arguments

ID

An object returned by pfSiteSel.

Value

out

A matrix of charcoal data with the following structure: out[,1]=Site identifiers, out[,2]=Depths, out[,3]=Estimated ages, out[,4]=Charcoal data.

Examples

Run this code
# NOT RUN {
## Retrieve a site
ID=pfSiteSel(site_name=="Pas-de-Fond")
## Or a group of sites (Western North America)
ID=pfSiteSel(continent=="North America", long<(-100))

## Extract data
A=pfExtract(ID)

# Plot the first site raw charcoal data
plot(A[A[,1]==ID$id_site[1],3],A[A[,1]==ID$id_site[1],4],type="l",main=ID$site_name[1],
     xlab="Age",ylab="raw Char")
# }

Run the code above in your browser using DataLab