# NOT RUN {
library(embryogrowth)
data(resultNest_4p_SSM4p)
ti <- seq(from=0, to=(60*24*100), by=60)
temperatures <- rnorm(length(ti), 29, 5)
temperatures <- temperatures+ti/(60*24*100)/2
layout(mat=1:3)
parpre <- par(mar=c(4, 4, 1, 1)+0.4)
plot(ti/(60*24), temperatures, type="l", xlab="Days",
ylab=expression("Nest temperature in "*degree*"C"), bty="n", las=1)
# The sexualisation thermal reaction norm is calculated for South Pacific RMU
out <- MovingIncubation(NestsResult=resultNest_4p_SSM4p,
temperatures.df=data.frame(Time=ti, Temperature=temperatures),
metabolic.heating = 0,
SexualisationTRN = structure(c(71.922411148397, 613.773055147801,
318.059753164125, 120.327257089974),
.Names = c("DHA", "DHH", "T12H", "Rho25")))
with(out, plot(Time/(60*24), Incubation.length.mean/(60*24),
xlab="Days along the season",
ylab="Incubation duration",
type="l", bty="n", las=1, ylim=c(72, 75)))
with(out, plot(Time/(60*24), TSP.MassWeighted.STRNWeighted.temperature.mean,
xlab="Days along the season",
ylab=expression("CTE for sex ratio in "*degree*"C"),
type="l", bty="n", las=1, ylim=c(30, 31)))
par(mar=parpre)
layout(mat=c(1))
# }
Run the code above in your browser using DataLab