serac | R Documentation |
This is the main age-depth modelling function. The default values can be changed permanently within this file or temporarily when calling serac(). If there is any options you would like to see included in future version, please contact one of the authors.
serac(
name = "",
model = c("CFCS"),
Cher = NA,
NWT = NA,
Hemisphere = NA,
FF = NA,
age_forced_CRS = NULL,
depth_forced_CRS = NULL,
inst_deposit = c(0),
input_depth_mm = T,
ignore = c(),
mass_depth = FALSE,
plotpdf = FALSE,
plottiff = FALSE,
preview = TRUE,
plotphoto = FALSE,
minphoto = c(),
maxphoto = c(),
Pbcol = c("black", "midnightblue", "darkgreen"),
inst_depositcol = grey(0.85),
modelcol = c("black", "#DDA0DD", "red", "darkorange"),
historic_d = NA,
historic_a = NA,
historic_n = NA,
historic_test = NA,
suppdescriptor = FALSE,
descriptor_lab = c(),
suppdescriptorcol = c("black", "purple"),
coring_yr = c(),
coring_year = c(),
plot_Am = FALSE,
plot_Cs = FALSE,
plot_Pb = TRUE,
plot_Pb_inst_deposit = FALSE,
plot_CFCS_regression = c(),
varves = FALSE,
dmin = c(),
dmax = c(),
sedchange = c(0),
error_DBD = 0.07,
min_yr = 1880,
SML = c(0),
stepout = 5,
mycex = 1,
hiatus = NULL,
archive_metadata = FALSE,
save_code = TRUE,
prop_width_fig = 1,
prop_height_fig = 1,
plot_Cs_line = TRUE,
DL_Pb = NULL,
DL_Cs = NULL,
DL_Am = NULL,
custom_xlim_Pb = NULL,
plot_unit = "mm"
)
name |
Name of the core, given using quotes. Defaults to the core provided with serac. Use preferably the published name of the core for traceability. |
model |
Select 1 to 4 item between c("CFCS", "CIC", "CRS", "CRS_pw"). If several models are selected, they will all be plotted together in the last window. |
Cher |
If 137Cs measurement were done, where do you detect the Chernobyl peak? The argument is a vector of two depth given in millimeters giving the top and bottom threshold for the 1986 Chernobyl event. The user can run the model without giving any specification before making a decision. In such case, leave the argument empty. Note that the two depths needs to represent a sample, or more than a sample. |
NWT |
If 137Cs measurement were done, where do you detect the Nuclear Weapon Test peak? The argument is a vector of two depth given in millimeters giving the top and bottom threshold for the 1960s Nuclear Weapon Test event. The user can run the model without giving any specification before making a decision. In such case, leave the argument empty. Note that the two depths needs to represent a sample, or more than a sample. |
Hemisphere |
Chose between North Hemisphere "NH" and South Hemisphere "SH" depending on the location of your system. This argument is required if you chose to plot NWT. |
FF |
If 137Cs measurement were done, where do you detect the First Fallout period? The argument is a vector of two depth given in millimeters giving the top and bottom threshold for the First Fallout period in 1955. The user can run the model without giving any specification before making a decision. In such case, leave the argument empty. Note that the two depths needs to represent a sample, or more than a sample. |
age_forced_CRS |
If CRS_pw is chosen, which age(s) to be used to force the model. Must be the same length as depth_forced_CRS. Using by default 1986 for Chernobyl event. |
depth_forced_CRS |
If CRS_pw is chosen, which depth(s) to be used to force the model. Must be the same length as age_forced_CRS. Using by default the average depth chosen in the argument Cher, i.e., if Cher = c(55, 65) and depth_forced_CRS is left NULL, then the function will calculate depth_forced_CRS to be 60. |
inst_deposit |
Upper and lower depths (in mm) of sections of abrupt accumulation that inst_deposit c() should be excised, e.g., c(100, 120, 185, 195) for two sections of 10.0-12.0 cm and 18.5-19.5 cm depth |
input_depth_mm |
Units for SML, radionuclides peaks (Chernobyl, Nuclear War Tests, and First Fallouts), instantaneous deposits, depths to ignore, and hiatus (if any). Default is TRUE, and inputs must be in mm - unless "input_depth_mm = FALSE". If turned to FALSE, input can be given in g/cm2. |
ignore |
The depth (in mm - unless "input_depth_mm = FALSE") of any sample that should be ignored from the age-depth model computation, e.g., c(55) will remove the measurement done at 5.5 cm. The data will be ploted by default in grey on the output graph (you can change this with the inst_depositcol argument) |
mass_depth |
Logical argument. If TRUE, require density, and will plot the radionuclides against massic depth. Core photo and supplementary descriptor are not available under this option. |
plotpdf |
Logical argument to indicate whether you want the output graph to be saved to your folder in pdf format. We recommend the plottiff (plot in tiff) for publication. |
plottiff |
Logical argument to indicate whether you want the output graph to be saved to your folder in tiff format. While taking more space on the disk, we recommend this option for publication because we found some polygons to be missing on some computers. We will update the code as we learn more about that issue. |
preview |
Logical argument to indicate whether you want the output graph to be ploted. Default is TRUE, and the graph is ploted within your R session. It might be convenient to turn this argument to FALSE if errors keep coming telling you your R window is too small. |
plotphoto |
Logical argument to indicate whether you want to plot the photo of the core along your age-model. If plotphoto=TRUE, you need to indicate the upper and lower limit of the photo in mm - unless "input_depth_mm = FALSE" in following arguments. |
minphoto |
Mandatory if plotphoto=TRUE. Lower limit of the core photo in mm - unless "input_depth_mm = FALSE", e.g., minphoto=0 indicates that the photo starts at 0 mm. The photo will automatically be truncated acording to the minimum and maximum depth of the age model given in other arguments. |
maxphoto |
Mandatory if plotphoto=TRUE. Upper limit of the core photo in mm - unless "input_depth_mm = FALSE", e.g., maxphoto=320 indicates that the photo ends at 32 cm. The photo will automatically be truncated acording to the minimum and maximum depth of the age model given in other arguments. |
Pbcol |
Vector of color to plot 210Pbex data. If length(Pbcol)>1, the different colors will be used to plot the different slopes in between change(s) in sedimentation rate. Example of color vector: Pbcol=c("black", "midnightblue", "darkgreen"). |
inst_depositcol |
A color to plot the data points within instantaneous deposit or ignored data. Example: inst_depositcol=grey(0.85). |
modelcol |
Vector of color to plot different model if length(model)>1. If length(modelcol)>1, the different colors will be used to plot the different change in sedimentation rate. Example of color vector: modelcol=c("black", "red", "darkorange") to plot "CFCS", "CIC", "CRS" models in this order. |
historic_d |
Vector with upper and lower depth of historical event(s), e.g., historic_d=c(120, 130) will identify the event between 12 and 13 cm on the last window with the age model. |
historic_a |
Vector of year of different historical events, e.g., historic_a=c(1895) will add the point 1895 on the last window with the age model. Historical events can be older than the dated section, in which case the depth is obtained from the model if historic_d is not specified. historic_a is a vector twice as short as historic_d, as each age correspond to an upper+lower limit in the vector 'historic_d'. If not all ages are known, put NA in the vector, e.g., historic_a=c(NA, 1895) |
historic_n |
Vector of names of different historical events, e.g., historic_n=c("1895 flood"). Optional. If you plot several events, and don't want to plot all the names, add a NA in the vector, e.g., historic_n=c(NA, "1895 flood") will understand that the first event doesn't have a name, but the second does. |
historic_test |
Visualisation tool for known ages. This argument will plot a vertical line in the last window (the one with the age-depth model). Can be useful when the user know specific ages that may have resulted in changes in sedimentation rates. E.g., historic_test=c(1996). |
suppdescriptor |
Up to two supplementary descriptor(s) to plot in an additional window. Logical argument. The decision on ploting more than one supplementary descriptor depends on the length of the vector descriptor_lab. An additional input file with these data should be included in the folder with the initial data. |
descriptor_lab |
Label used on the axis, e.g., descriptor_lab=c("LOI", "Ca/Fe") if two supplementary descriptors are specified. |
suppdescriptorcol |
Vector of color to plot different descriptor if length(descriptor_lab)>1. If length(descriptor_lab)>1, the different colors will be used to plot the different change in sedimentation rate. Example of color vector: suppdescriptorcol=c("black", "purple"). |
coring_yr |
Year of coring. Alternate spelling of the argument: coring_yr. Fill one or the other. |
plot_Am |
Logical argument indicating whether or not serac should plot 241Am. |
plot_Cs |
Logical argument indicating whether or not serac should plot 137Cs. |
plot_Pb |
Logical argument indicating whether or not serac should plot 210Pbex. |
plot_Pb_inst_deposit |
Logical argument indicating whether or not serac should plot 210Pbex without instantaneous deposit. If TRUE, inst_deposit shouldn't be a null vector. |
plot_CFCS_regression |
Whether to plot or not the linear regression. If the parameter is not specified, it will automatically turn to TRUE, but will also automatically turn to FALSE if instantaneous deposit are present but the argument 'plot_Pb_inst_deposit' is turned to FALSE. Linear regression won't match if there are some instantaneous deposit. In other words, in most cases, the user shouldn't need to modify this parameter. |
varves |
Logical argument to indicate whether varve counting results should be ploted on the last window. An additional input file with these data should be included in the folder with the initial data. |
dmin |
Maximum depth of age-depth model (useful if the user doesn't want to plot the lower region). |
dmax |
Maximum depth of age-depth model (useful if the user doesn't want to plot the lower region). dmax cannot be in the middle of an instantaneous deposit. e.g. if there is an instantaneous deposit between 180 and 200 mm, dmax cannot be 190 mm, and will be converted to 200 mm automatically. |
sedchange |
Up to two changes in sedimentation rate, e.g., sedchange=c(175, 290) indicates two changes of sedimentation rate at 17.5 and 29.0 cm. |
error_DBD |
By default, error_DBD = 0.07, as Appleby (2001) suggest a 7% error on dry bulk density (DBD). |
min_yr |
The minimum year limit for the age-depth model plot. The user can adjust this argument after a first computation of the model |
SML |
Surface Mixed Layer: a depth in mm - unless "input_depth_mm = FALSE" above which the sediment is considered to be mixed. E.g., SML=30 indicates that the first 3 cm are mixed sediment: the data point are ploted but not included in the Pb models. |
stepout |
Depth resolution for the file out in mm - unless "input_depth_mm = FALSE". |
mycex |
Graphical parameter: a multiplication factor to increase (mycex>1) ou decrease (mycex<1) label sizes. |
hiatus |
If there are any hiatus, enter it/them here. The input form is a list of as many vectors as there are hiatuses, and each vector is made of two elements minimum: the depth of the hiatus in mm and the length, in years. For example, enter 'hiatus = list(c(100, 5))' for a 5-years hiatus at 100mm. By default, "hiatus" will be printed on the graph. Optionally, the user can specify a name and a color to the by adding element to the vector in the list. Example: hiatus = list(c(100, 5, "hiatus", "blue"), c(100, 5, "", "red")) will had two hiatuses. Only the first one will have a name, and they will each be plotted with a different colors. Default = NULL. |
archive_metadata |
Logical argument. If TRUE, require fields regarding the measurements on the core. Allows missing information; just press 'ENTER' in your computer (leave an empty field). |
prop_width_fig |
Increase of decrease the height of the figure output using this argument. prop_width_fig < 1 will make the figure narrower, prop_width_fig > 1 will make the figure wider. |
prop_height_fig |
Increase of decrease the height of the figure output using this argument. prop_height_fig < 1 will make the figure smaller, prop_height_fig > 1 will make the figure taller. |
plot_Cs_line |
Logical argument. Whether or not to plot the lines in the Cesium window plot. Default = TRUE |
DL_Pb |
Detection limit for Pb - the corresponding depth of any value in the Pbex column that is below DL_Pb is added to the 'ignore' vector. Default to NULL. ||recent addition, modify your data manually and keep the default to NULL if you encounter issues|| |
DL_Cs |
Detection limit for Cs - any value in the Cs column that is below DL_Cs will be changed to NA, together with the corresponding error. Default to NULL. ||recent addition, modify your data manually and keep the default to NULL if you encounter issues|| |
DL_Am |
Detection limit for Am - any value in the Am column that is below DL_Am will be changed to NA, together with the corresponding error. Default to NULL. ||recent addition, modify your data manually and keep the default to NULL if you encounter issues|| |
custom_xlim_Pb |
Min and max limits for the Pb plot. Needs two numeric values. Default to NULL will automatically turn the values to c(1, 1000). Note that the value you enter will be shown on a log scale. |
plot_unit |
Default = "mm", but if plot_unit = "cm", will change the ticks marks and units for the plot. |
# Lake Bourget
# serac(name="LDB", coring_yr=2004)
# serac(name="LDB", coring_yr=2004, model=c("CFCS"), plotphoto=TRUE, minphoto=c(0), maxphoto=c(370), plot_Pb=T, plot_Pb_inst_deposit=T, plot_Cs=T, plot_Am=T, Cher=c(75, 85), Hemisphere=c("NH"), NWT=c(172, 180), inst_deposit=c(197, 210), historic_d=c(197, 210), historic_a=c(1958), historic_n=c("earthquake 1958"), varves=T, plotpdf=T, preview=T, stepout=1)
# Lake Iseo
# serac(name="Iseo", coring_yr=2010)
# serac(name="Iseo", coring_yr=2010, model=c("CFCS", "CIC", "CRS"), plotphoto=TRUE, minphoto=c(0), maxphoto=c(320), plot_Pb=T, plot_Am=T, plot_Cs=T, Cher=c(70, 75), Hemisphere=c("NH"), NWT=c(130, 140), FF=c(164, 173), varves=TRUE, plotpdf=T, stepout=5)
# Lake Luitel
# serac(name="LUI", coring_yr=2012, model=c("CFCS", "CIC", "CRS"), mass_depth=T, plotphoto=T, minphoto=c(0), maxphoto=c(470), plot_Pb=T, plot_Cs=T, Cher=c(115, 125), Hemisphere=c("NH"), NWT=c(285, 295), FF=c(305, 315), plotpdf=TRUE)
# Lake Saint-Andre
# serac(name="SAN", coring_yr=2011, model=c("CFCS", "CIC", "CRS"), plotphoto=TRUE, minphoto=c(0), maxphoto=c(420), plot_Pb=T, sedchange=c(165, 260), plot_Am=T, plot_Cs=T, Cher=c(195, 205), Hemisphere=c("NH"), NWT=c(275, 295), FF=c(315, 325), plotpdf=TRUE, archive_metadata=F)
# Lake Allos
# serac(name="ALO09P12", coring_yr=2009, model=c("CFCS"), plotphoto=TRUE, minphoto=c(0), maxphoto=c(210), plot_Pb=T, plot_Am=T, plot_Cs=T, Cher=c(30, 40), Hemisphere=c("NH"), NWT=c(51, 61), sedchange=c(75.5), plot_Pb_inst_deposit=T, inst_deposit=c(20, 28, 100, 107, 135, 142, 158, 186), suppdescriptor=TRUE, descriptor_lab=c("Ca/Fe"), historic_d=c(20, 28, 100, 107, 135, 142, 158, 186), historic_a=c(1994, 1920, 1886, 1868), historic_n=c("sept1 994 flood", "1920 flood", "1886 flood", "1868 flood ?"), min_yr=c(1750), dmax=c(180), plotpdf=TRUE, preview=F)
# Pierre-Blanche lagoon
# serac(name="PB06", coring_yr=2006, model=c("CFCS", "CRS"), plotphoto=TRUE, minphoto=c(0), maxphoto=c(350), plot_Pb=T, plot_Pb_inst_deposit=T, inst_deposit=c(315, 350), SML=30, plot_Cs=T, Cher=c(50, 60), Hemisphere=c("NH"), NWT=c(100, 120), suppdescriptor=T, descriptor_lab=c("Si/Al"), historic_d=c(315, 350), historic_a=c(1893), historic_n=c("1894 storm"), min_yr=1870, dmax=c(350), plotpdf=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.