Learn R Programming

lomb (version 2.5.0)

actogram: Plot actogram

Description

plots an actogram for a time series with irregular (or regular) sampling intervals.

Usage

actogram(date, response,from ,to, scalefac, subtract, dble,
  dig, border, fill, grad, lwd, photo,latitude, longitude, zone, twilight)

Arguments

date

data datetime, format as in as.Date

response

which variable to plot

from

date for start of subsection

to

date for end of subsection

scalefac

one day is 1.0 wide. Use >1 if plots are exaggerated

subtract

value to subtract from response.

dble

logical Double plot? Ie day1 day2, day2 day3, day3 day4 ...

dig

logical Digitize to 0 1 based on mean?

border

border_colour of rectangle edges

fill

colour of rectangle fills, relevant only if timepoint separation is large

grad

logical Plot gradient?

lwd

line width of rectangles

photo

logical Plot photoperiod? Photo is true when location is entered.

latitude

animal location

longitude

animal location

zone

time zone of location. Default:0 = Greenwich

twilight

"rise/set", "civil" or "nautic"

Details

This function plots actograms of both unevenly and evenly sampled data. It only requires data in standard R format, no special rhythms format is necessary.

Examples

Run this code
if (FALSE) {

data(caradat)
actogram(caradat$Date, caradat$Activity, dble=TRUE, photo=FALSE, dig=TRUE, fill="blue")


data(deerdat)
actogram(deerdat$Zeit, deerdat$Akt, grad=TRUE,from="2010-10-01 00:00:00",to="2011-03-31 00:00:00",
latitude=47.1415,longitude=9.5215,zone=1,twilight="nautic")
}

Run the code above in your browser using DataLab