Learn R Programming

lomb (version 2.5.0)

makedf: makes a data.frame from an actogram for lsp

Description

Converts an actogram to a periodogram

Usage

makedf(tvar, pvar)

Value

a data.frame with two colums: time and variable (eg. activity)

Arguments

tvar

data datetime

pvar

which variable to plot

Examples

Run this code
 if (FALSE) {
 
data(caradat) #unevenly sampled
focus=actogram(caradat$Date, caradat$Activity, dble=TRUE, photo=FALSE, zone=1, 
  from="1970-01-01 00:00:00",to="1970-01-14 00:00:00")
df=makedf (focus$date, focus$plotvar)
lsp(df, type="period",ofac=5,from=12,to=36)


data(layla) #evenly sampled
focus=actogram(layla$Date,layla$Activity,latitude=48.20, longitude=16.37,  zone=2, dig=TRUE)
df=makedf (focus$date, focus$plotvar)
lsp(df, type="period",ofac=5,from=20,to=50)
 }

Run the code above in your browser using DataLab