Last data update: 2014.03.03

R: Plot the embryo growth
plot.NestsResultR Documentation

Plot the embryo growth

Description

Plot the embryo growth from one or several nests.
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 for Caretta caretta, 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.
show.fioritures parameter does not affect show.test option.
Note: three species have predefined embryo stages. embryo.stages parameter can take the values:

  • Caretta caretta.SCL

  • Chelonia mydas.SCL

  • Emys orbicularis.SCL

  • Emys orbicularis.mass

Usage

## S3 method for class 'NestsResult'
plot(x, ..., parameters = NULL,
  fixed.parameters = NULL, SE = NULL, temperatures = NULL,
  derivate = NULL, test = NULL, stopattest = FALSE, M0 = NULL,
  weight = NULL, series = "all", TSP.borders = NULL,
  embryo.stages = "Caretta caretta.SCL", replicate.CI = 100,
  metric.end.incubation = NULL, col.stages = "blue", col.PT = "red",
  col.TSP = "gray", col.temperatures = "green", col.S = "black",
  lty.temperatures = 1, lwd.temperatures = 2, ylimT = NULL,
  ylimS = NULL, xlim = NULL, show.stages = TRUE, show.TSP = TRUE,
  show.third = TRUE, show.CI = TRUE, show.metric = TRUE,
  show.fioritures = TRUE, show.temperatures = TRUE, show.PT = TRUE,
  PT = c(mean = NA, SE = NA), show.test = TRUE, add = FALSE,
  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", progress = TRUE)

Arguments

x

A result file generated by searchR

...

Parameters for plot()

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, or replace the one in NestsResult. Use SE=NA to remove SE from NestResult

temperatures

Timeseries of temperatures formatted using formatNests(). 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

stopattest

TRUE or FALSE. If TRUE, the model stops when proxy of size reached the mean test size.

M0

Measure of hatchling size proxi at laying date

weight

Weights of the different nests to estimate likelihood

series

The name or number of the series to be displayed. Only one series can be displayed at a time.

TSP.borders

The limits of TSP in stages. See embryo.stages parameter.

embryo.stages

The embryo stages. At least TSP.borders stages must be provided to estimate TSP borders. See note.

replicate.CI

Number of replicates to estimate CI. If 1, no CI is estimated.

metric.end.incubation

The expected metric at the end of incubation. Used to calibrate TSP size. If NULL, take the maximum Mean of the test parameter. If NA, use the actual final size. Can be a vector and is recycled if necessary.

col.stages

The color of the stages

col.PT

The color of the pivotal temperature

col.TSP

The color of the TSP

col.temperatures

The color of the temperatures

col.S

The color of the size or mass. Can be a vector (useful when series="all" option).

lty.temperatures

Type of line for temperatures

lwd.temperatures

Width of line for temperatures

ylimT

Range of temperatures to be displayed

ylimS

Range of size to be displayed

xlim

Range of incubation days to be displayed

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?

show.metric

TRUE or FALSE, does the plot of embryo metric is shown?

show.fioritures

If FALSE, set show.PT, show.temperatures, show.stages, show.TSP, show.third, show.CI to FALSE

show.temperatures

TRUE or FALSE, does the temperatures should be displayed?

show.PT

TRUE or FALSE, does the pivotal temperature should be displayed?

PT

Value for pivotal temperature, mean and SE

show.test

TRUE or FALSE, does the hatchling size should be displayed

add

If TRUE, all the curves are shown on the same graph

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

mar

Parameter mar used for plot

xlab

Label for axis

ylabT

Label for temperature axis

ylabS

Label for size axis

progress

If FALSE, the progress bar is not shown (useful for use with sweave or knitr)

NestsResult

A NestsResult file generated by searchR

Details

plot.NestsResult Plot the embryo growth

Value

Nothing

Author(s)

Marc Girondot

Examples

## Not run: 
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, add=TRUE)
# to use color different for series
plot(resultNest_4p, xlim=c(0,70), ylimT=c(22, 32), ylimS=c(0,45), add=TRUE, 
	series="all", show.fioritures=FALSE, col.S=c(rep("black", 5), rep("red", 6)))

## End(Not run)

Results