Learn R Programming

RChronoModel (version 0.1)

MultiPhasesGap: Gap/Hiatus between a succession of phases (for phases in temporal order constraint)

Description

This function finds, if it exists, the gap between two successive phases. This gap or hiatus is the longest interval [IntervalInf, IntervalSup] that satisfies : P(Phase1End < IntervalInf < IntervalSup < Phase2Beginning | M) = level.

Usage

MultiPhasesGap(file, position, level = 0.95, max_decimal = 0,
dec = '.', sep=',', comment.char='#')

Arguments

file
name of the CSV file containing the output of the MCMC algorithm of all phases of interest
position
numeric vector containing the position of the beginning of the phases of interest in the CSV file in the order of the succession
level
probability corresponding to the level of confidence
max_decimal
maximum number of decimal
dec
the character used in the file for decimal points for the use of read.csv()
sep
the field separator character for the use of read.csv()
comment.char
a character vector of length one containing a single character or an empty string for the use of read.csv()

Value

  • Returns a matrix of values containing the level of confidence and the endpoints of the gap for each pair of successive phases

Examples

Run this code
data(Phases)
  write.csv(Phases, "data.csv")
  MultiPhasesGap("data.csv", c(4,2), 0.95, 0)

Run the code above in your browser using DataLab