incRenv: Matching environmental and nest temperatures

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function takes a data frame with recordings of environmental temperature and another with nest temperatures and merges both per unit of time. The user can do this work manually, however, incRenv is thought to automate data preparation (in combination with incRprep) to use incRscan after.

Usage

1
2
incRenv(data.nest, data.env, env.temperature.name, env.date.name,
  env.date.format, env.timezone)

Arguments

data.nest

data frame containing nest temperature recordings. It must have two compulsory columns 'date' and 'hour' displaying dates and the hour of each observation. These two columns are provided if the user uses incRprep before.

data.env

data frame containing environmental temperatures to be merged with nest temperature records. Please, provide date and time of each observation in one unique column as requested for incRprep.

env.temperature.name

name of the column containing temperature recordings in the data.env data frame.

env.date.name

name of the column containing date and time in the data.env data frame.

env.date.format

format of env.date.name. Similar to incRprep.

env.timezone

time zone of the environmental recordings. Similar to incRprep.

Details

This function is thought to be used after incRprep as it uses some of the additional variables created by incRprep.

Value

The original data.nest with an additional column for hour-averaged environmental temperature. This new variable is thought to serve as env_temp in incRscan.

Author(s)

Pablo Capilla-Lasheras

See Also

incRprep incRscan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(incR_envdata)  # environmental data
head (incR_envdata)

data(incR_rawdata)  # loading nest data
head (incR_rawdata)

# the first step in to format the raw data using incRprep
new.data <- incRprep (data=incR_rawdata,
                      date.name= "DATE",
                      date.format= "%d/%m/%Y %H:%M",
                      timezone="GMT",
                      temperature.name="temperature")
                      
# then use incRenv to merge environmental data
new.data2 <- incRenv (data.nest = new.data,
                      data.env = incR_envdata, 
                      env.temperature.name = "env_temperature", 
                      env.date.name = "DATE", 
                      env.date.format = "%d/%m/%Y %H:%M", 
                      env.timezone = "GMT")
                     
head (new.data2, 3)

incR documentation built on May 2, 2019, 6:12 a.m.