incRt: Calculation of temperature average and variance for...

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculation of temperature average and variation between two customised time periods per day. Time windows can be defined by the user using the limits argument, defined by bird activity time (using the activity.times parameter) or set according to twilight times if coordinates are provided (coor).

Usage

1
2
incRt(data, temp.name, limits = NULL, coor = NULL, activity.times = FALSE,
  civil.twilight = FALSE, time.zone = NULL, ...)

Arguments

data

data frame containing a time-series vector of 1's and 0's (incubation scores), where "1" means "incubating individual inside nest" and "0" means "incubating individual outside the nests". This vector, under the name of incR_score, is provided by incRscan in the first object of the returned list. A column named "date" is needed to refer to daily calculations.

temp.name

(character object) name of the column containing temperature data in data.

limits

vector of length 2 giving the time limits for calculations. For example, 'c(6,20)' would calculate temperature averages and variances for two time periods, from 6 to 20 and from 20 to 6 of the next day. 'civil.twilight' and 'activity.times' must be FALSE to allow the use of 'limits'.

coor

coordinates for the location where temperature was recorded, formatted as decimal degrees N/S, decimal degrees E/W. When 'civil.twilight' is TRUE, 'coor' allows the user to define sunrise and sunset times based on the crepuscule function (in maptools package).

activity.times

TRUE or FALSE. Set as TRUE when time periods for calculation are defined by incRact. Data must contain a column named 'incR_score' for the use of incRact.

civil.twilight

TRUE or FALSE. Set as TRUE when time periods for calculation are to be defined by civil twilight times - calculated using crepuscule. If 'civil.twilight = TRUE', 'coor' and 'time.zone' need to be specified.

time.zone

time zone for crepuscule dawn and dusk calculations.

...

use parameters in incRact if activity.times = TRUE.

Value

a data frame containing temperature means and variance for the defined time window.

Author(s)

Pablo Capilla-Lasheras

See Also

incRprep incRscan incRact crepuscule

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# loading example data
data(incR_procdata)

# calculation based on chosen times from 6am to 7pm and 7pm to 6am
incRt (data=incR_procdata, 
        temp.name="temperature",
        limits=c(6,19), 
        coor=NULL, 
        civil.twilight=FALSE, 
        activity.times=FALSE,
        time.zone=NULL)
        
# calculation based on activity times
incRt (data=incR_procdata, 
        temp.name="temperature", 
        limits=NULL, 
        coor=NULL, 
        civil.twilight=FALSE, 
        activity.times=TRUE,
        time.zone=NULL,
        time_column="time",             # extra argument needed for incRact
        vector.incubation="incR_score") # extra argument needed for incRact
        
# calculation based on civil twilight
incRt (data=incR_procdata, 
        temp.name="temperature",
        limits=NULL, 
        coor=c(42,0.89), 
        civil.twilight=TRUE, 
        activity.times=FALSE,
        time.zone="GMT")

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