Learn R Programming

ArchaeoPhases (version 1.8)

CreateMinMaxGroup: Construct the minimum and maximum for a group of events (phase)

Description

Constructs a data frame containing the output of the MCMC algorithm corresponding to the minimum and maximum of a group of events

Usage

CreateMinMaxGroup(
  data,
  position,
  name = "Phase",
  add = NULL,
  exportFile = NULL
)

Arguments

data

Data frame containing the output of the MCMC algorithm.

position

Numeric vector containing the position of the column corresponding to the MCMC chains of all dates included in the phase of interest.

name

Name of the current group of dates or phase.

add

Name of the data frame in which the current minimum and maximum should be added, default = NULL.

exportFile

Name of the final file that will be saved if chosen, default = NULL.

Value

A data frame containing the minimum and maximum of the group of dates included in the phase of interest. These values may be appended to a data frame add if given.

Examples

Run this code
# NOT RUN {
  data(Events)
  Temp = CreateMinMaxGroup(Events, c(2,4), name = "Phase2")
# }
# NOT RUN {
  #To do for saving the new variables in csv file
  Temp = CreateMinMaxGroup(Events, c(3,5), name = "Phase1", add=Temp,
 
# }
# NOT RUN {
                          exportFile = "MinMaxPhases.csv")
# }

Run the code above in your browser using DataLab