Learn R Programming

embryogrowth (version 5.0)

plot.NestsResult: Plot the information about a nest

Description

Plot the information about a nest The embryo.stages is a list with stage numbers and relative size as compared to final size at the beginning of the stage. For example embryo.stages=list(number=21:30, size=c(8.4, 9.4, 13.6, 13.8, 18.9, 23.5, 32.2, 35.2, 35.5, 38.5)/39.33) indicates that the stages 21 begins at the relative size of 8.4/39.33. The default is for the turtle "Caretta caretta". Series can be indicated as the name of the series, its number or succesion of TRUE or FALSE. "all" indicates that all series must be printed. The object return is an invisible list composed of two lists: $summary with the summary statistics for each nest and $traces with the change of length or mass for each nest. show.fioritures does not affect show.test option.

Usage

## S3 method for class 'NestsResult':
plot(x, ..., OutPlot = NULL, parameters = NULL,
  fixed.parameters = NULL, SE = NULL, temperatures = NULL,
  derivate = NULL, test = NULL, stopattest = FALSE, M0 = NULL,
  series = 1, col.stages = "blue", col.PT = "red", col.TSP = "gray",
  col.temperatures = "green", col.S = "black", ylimT = c(25, 35),
  ylimS = NULL, xlim = NULL, TSP.borders = c(21, 26),
  embryo.stages = "Caretta caretta", show.stages = TRUE, show.TSP = TRUE,
  show.third = TRUE, show.CI = TRUE, replicate.CI = 100,
  ref.stage = TRUE, show.fioritures = TRUE, progress = TRUE,
  show.temperatures = TRUE, show.PT = TRUE, PT = c(NA, NA),
  show.test = TRUE, lab.third = "2nd third of incubation",
  at.lab.third = 4, lab.PT = "PT", lab.stages = "Stages", mar = c(4, 5,
  4, 5) + 0.3, xlab = "Days of incubation",
  ylabT = expression("Temperatures in " * degree * "C"),
  ylabS = "Embryo metric", show.plot = TRUE)

Arguments

x
A result file generated by searchR
...
Parameters for plot()
OutPlot
A previous output of a plot.NestsResult() or info.nests()
parameters
A set of parameters if result is not provided.
fixed.parameters
Another set of parameters if result is not provided.
SE
Standard error for each parameter if result is not provided.
temperatures
Timeseries of temperatures. Will replace the one in result.
derivate
Function used to fit embryo growth: dydt.Gompertz, dydt.exponential or dydt.linear
test
Mean and SD of size of hatchlings ie test=c(Mean=xx, SD=yy)
stopattest
True or False, does the plot stops when proxi of size reaches the mean test size.
M0
Measure of hatchling size proxi at laying date
series
The name or number of the series to be displayed. Only one series can be displayed at a time.
col.stages
The color of the stages
col.temperatures
The color of the temperatures
col.TSP
The color of the TSP
col.PT
The color of the pivotal temperature
col.S
The color of the size or mass. Can be a vector (useful when series="all" option).
ylimT
Range of temperatures to be displayed
ylimS
Range of size to be displayed
xlim
Range of incubation days to be displayed
TSP.borders
The limits of TSP
embryo.stages
The embryo stages. At least TSP.borders stages must be provided if show.TSP is TRUE
ref.stage
If TRUE, the reference size for stage is the observed one in modelling. If FALSE, it is the field observed size.
show.stages
True or False, does the embryo stages should be displayed
show.TSP
True or False, does the TSP boders should be displayed
show.third
True or False, does the first and second third boders should be displayed
show.CI
True or False, do the confidence intervals should be displayed
replicate.CI
Number of randomizations to estimate CI
show.temperatures
True or False, does the temperatures should be displayed
show.PT
TRUE or FALSE, does the pivotal temperature should be displayed
show.fioritures
If FALSE, set show.PT, show.temperatures, show.stages, show.TSP, show.third, show.CI to FALSE
PT
Value for pivotal temperature
show.test
True or False, does the hatchling size should be displayed
lab.third
Label for 2nd third of incubation
at.lab.third
Position of Label for 2nd third of incubation [default=4]
lab.PT
Label for Pivotal Temperature
lab.stages
Label for Stages
xlab
Label for axis
ylabT
Label for temperature axis
ylabS
Label for size axis
mar
Parameter mar used for plot
show.plot
If FALSE, only the text output is shown
progress
If FALSE, the progress bar is not shown (useful for use with sweave or knitr)

Value

  • A list with informations about statistics for the series of nests analyzed ($summary) and exact times series of length changes for each nest ($traces)

Details

plot.NestsResult Plot the information about a nest

Examples

Run this code
library(embryogrowth)
data(resultNest_4p)
plot(resultNest_4p, xlim=c(0,70), ylimT=c(22, 32), ylimS=c(0,45), series=1,
	SE=c(DHA=1.396525, DHH=4.101217, T12H=0.04330405, Rho25=1.00479))
# to plot all the nest at the same time, use
plot(resultNest_4p, xlim=c(0,70), ylimT=c(22, 32), ylimS=c(0,45),
	series="all", show.fioritures=FALSE)
# to use color different for series
plot(resultNest_4p, xlim=c(0,70), ylimT=c(22, 32), ylimS=c(0,45),
	series="all", show.fioritures=FALSE, col.S=c(rep("black", 5), rep("red", 6)))

Run the code above in your browser using DataLab