place: Function to place a point on a period-by-period plot...

Description Usage Arguments Author(s) See Also Examples

Description

Places a point at a specified event time on a period-by-period plot generated by plot,mproc-method.

Usage

1
place(e, m, period, ...)

Arguments

e

the event time - must be within the start and end times of m.

m

an object of class mproc.

period

the period of the period-by-period plot.

...

further arguments passed to points.

Author(s)

Patrick Rubin-Delanchy <patrick.rubin-delanchy@bristol.ac.uk>

See Also

plot,mproc-method, mp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#### A has a daily pattern: its intensity is a sinusoidal curve lambda(t) = 1+sin(2*pi*t)
start=0; end=365 #A year
##the cumulative intensity is 
F=function(t){
    t%/%1+t%%1+(1-cos(2*pi*t%%1))/(2*pi)
}
##Dropping 365 A and B points according to F
A=sapply(runif(365), function(u){uniroot(function(x) F(x)/365-u, interval=c(0,365))$root})
m=mp(A,start=start, end=end)
##This plots A in a period by period plot
## Not run: plot(m, period=1)
##The middle of the day in the middle of the year:
x=365/2
## Not run: place(x,m, period=1, col="red", pch=8, cex=10)

mppa documentation built on May 2, 2019, 2:48 a.m.