Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

barCodes

Plot the median values of calibrated radiocarbon dates or bins


Description

Plot the median values of multiple calibrated radiocarbon dates or bins in a barcode-like strip.

Usage

barCodes(
  x,
  yrng = c(0, 0.03),
  width = 20,
  col = rgb(0, 0, 0, 25, maxColorValue = 255),
  border = NA,
  ...
)

Arguments

x

A vector containing median values obtained from medCal or binMed

yrng

y-axis range of the bars.

width

width of the bars (optional)

col

color of the bars

border

the color to draw the border. Use border = NA to omit borders.

...

Additional arguments affecting the plot

See Also

Examples

## Not run: 
#Load EUROEVOL Data
data(euroevol)

#Subset Danish Dates
denmark <- subset(euroevol,Country=="Denmark")

#Calibrate and Bin
denmarkDates <- calibrate(x=denmark$C14Age,errors=denmark$C14SD) 
denmarkBins <- binPrep(sites=denmark$SiteID,ages=denmark$C14Age,h=200) #200 years bin size

#Compute median date for each bin
bm <- binMed(x=denmarkDates,bins=denmarkBins)

#Compute median date for each date
dm <- medCal(denmarkDates)

#Compute SPD 
denmarkSPD <- spd(x=denmarkDates,bins=denmarkBins,timeRange=c(10000,4000))

#Plot SPD and barCodes of median dates
plot(denmarkSPD,runm=200)
barCodes(dm,yrng=c(0,0.01)) 

#Plot SPD and barCodes of median bins in BC/AD
plot(denmarkSPD,runm=200,calendar="BCAD")
barCodes(BPtoBCAD(bm),yrng=c(0,0.01)) 

## End(Not run)

rcarbon

Calibration and Analysis of Radiocarbon Dates

v1.4.2
GPL (>= 2)
Authors
Andrew Bevan [aut] (<https://orcid.org/0000-0001-7967-3117>), Enrico Crema [aut, cre] (<https://orcid.org/0000-0001-6727-5138>), R. Kyle Bocinsky [ctb], Martin Hinz [ctb], Philip Riris [ctb], Fabio Silva [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.