Learn R Programming

mmpp (version 0.1)

splitMPP: Split MPP Data by a Fixed-length Window

Description

This function splits point process instance into a list of splitted point process instances with length h.

Usage

splitMPP(mppdata, h = 60 * 60 * 48, Origin = TRUE, scaleMarks = FALSE,
  scaleWindow = TRUE, original.tic = NULL)

Arguments

mppdata
marked point process in data.frame composed of "time, mark1, mark2, ..."
h
width of the time window. Default is set to h=60*60*48, which is two days when $time is recorded in second. This is suitable for a special seismic data only.
Origin
Logical. If TRUE, the beginning of the window is assumed to be the origin of time. Default TRUE
scaleMarks
Logical. If TRUE, marks (except time) are normalized to have unit variance in whole time series (not in individual windows). Default FALSE.
scaleWindow
Logical. If TRUE, time interval (window.length) is normalized to one.
original.tic
vector of original time stamp for the input mppdata. If given, this function outputs a list of splitted MPP and a list of time stamps for elements of the splited mpp list.

Details

splitMPP splits point process instance into a list of splitted point process instances with length h.

Examples

Run this code
##The aftershock data of 26th July 2003 earthquake of M6.2 at the northern Miyagi-Ken Japan.
data(Miyagi20030626)
##  no. longitude latitude magnitude     time  depth year month day
## split events by 5-day
sMiyagi <- splitMPP(Miyagi20030626,h=60*60*5,scaleMarks=TRUE,original.tic=Miyagi20030626[,1])

Run the code above in your browser using DataLab