Description Usage Arguments Value Author(s) See Also Examples
This function is used to create a "pfAddData" object, from user defined csv files containing charcoal data, to be passed to pfTransform. csv files must contain three columns with Depth, Age, Charcoal quantity in this same order (for type="NONE" argument). A metadata csv file could also be specified with sites location information (three columns with: SITE_NAME, LATITUDE, LONGITUDE). CharAnalysis data files could also be used, in this case the file must include the following columns: DepthTop, DepthBottom, AgeTop, AgeBottom, Volume and Charcoal value in this exact order. Then the files are passed to the pretreatment function in order to calculate Charcoal Accumulation Rates (see pretreatment for details).
1 2 3 4 5 6 7 8 9 10 11 |
files |
Character, names and path to csv files. |
metadata |
Character, name and path to the (unique) metadata csv file. |
type |
Character, "NONE": user defined csv (default), "CharAnalysis": CharAnalysis data file. |
Int |
Logical specifying whether the pretreatment function interpolates particle zero counts, default TRUE. |
first, last |
Numeric, date of the first, last sample for accumulation rate calculation, if NULL first, last are automatically specified as the the minimum and maximum ages of the record respectively. |
yrInterp |
Numeric, temporal resolution of the interpolated accumulation rates, if NULL, yrInterp is automatically specified as the median resolution of the record. |
sep |
char, column separator for csv, "," by default |
dec |
char, decimal "." by default |
out |
A list with merged data files that can be passed to
|
O. Blarquez
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
# Ad user own data from CharAnalysis file (csv)
# In this example we will use data from:
# Senici, D., A. Lucas, H. Y. H. Chen, Y. Bergeron, A. Larouche, B. Brossier, O.
# Blarquez, and A. A. Ali. 2013. Multi-millennial fire frequency and tree abundance
# differ between xeric and mesic boreal forests in central Canada. Journal of Ecology:
# 101, 356-367.
files=c("http://blarquez.com/public/data//Ben.csv",
"http://blarquez.com/public/data/Small.csv")
metadata=c("http://blarquez.com/public/data/metadata.csv")
mydata=pfAddData(files=files,metadata=metadata,type="CharAnalysis")
# Transform and compositing:
TR1=pfTransform(add=mydata, method=c("MinMax","Box-Cox","Z-Score"),
BasePeriod=c(200,2000))
COMP2=pfCompositeLF(TR1, tarAge=seq(-50,8000,20), hw=500, nboot=100)
plot(COMP2)
# Three columns example (with semicolon csv files):
files=c("http://blarquez.com/public/data/Ben_area.csv",
"http://blarquez.com/public/data/Small_area.csv")
mydata=pfAddData(files=files, sep=";")
# Transform and compositing:
TR1=pfTransform(add=mydata, method=c("MinMax","Box-Cox","Z-Score"),
BasePeriod=c(200,2000))
COMP2=pfCompositeLF(TR1, tarAge=seq(-50,8000,20), hw=500, nboot=100)
plot(COMP2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.