Learn R Programming

embryogrowth (version 9.5)

FormatNests: Create a dataset of class Nests to be used with searchR

Description

Will create a dataset of class Nests to be used with searchR
FormatNests(nest, previous=x) with x being a previously formated data.
The raw data must be organized being:
First column is the time in minutes since the beginning of incubation
Each column next is the trace of temperatures, one column for each nest.
For example, for two nests:
Time Nest1 Nest2
0 29.8 27.6
90 30.2 28.8
120 30.4 30.7
180 31.2 32.6
...
65800 30.8 32.6
65890 30.2
65950 30.4

The Nest1 ends incubation at 65800 minutes whereas Nest2 ends incubation at 65950 (last row
with temperature for each).
The parameter Weight is a vector: weight=c(Nest1=1, Nest2=1.2)
It can be used to format database already formated with old format; in this case, just use data=xxx with xxx being the old format database.

Usage

FormatNests(
  data = stop("A dataset must be provided !"),
  previous = NULL,
  usemiddletime = FALSE,
  simplify = TRUE,
  weight = NULL
)

Value

A list with all the nests formated to be used with searchR.

Arguments

data

Data to be newly formated

previous

Data already formated

usemiddletime

If TRUE, suppose that recorded temperatures are those at middle segment

simplify

If TRUE, simply the time series by removing identical time series of temperatures

weight

Named vector with weight for likelihhod

Author

Marc Girondot marc.girondot@gmail.com

Details

FormatNests creates a dataset of class "Nests" to be used with searchR

Examples

Run this code
if (FALSE) {
library(embryogrowth)
data(nest)
formated <- FormatNests(nest, previous=NULL)
formated <- FormatNests(nest)
}

Run the code above in your browser using DataLab