add_Rule {sandbox}R Documentation

Add a Rule to a Rule Book

Description

The function adds a new rule to an existing rule book. The specified rule will be appended to the rule book.

Usage

add_Rule(book, name, group, type, populations = 1)

Arguments

book

character value, name of the rule book to be modified.

name

character value, name of the rule to be added.

group

character value, group to which the rule belongs. One out of "general" (covering the sediment section properties) and "specific" (relevant for a single grain).

type

character value, generic type of the rule. One out of "exact" (defined by exact value, changing with depth), "normal" (normal distribution, defined by mean and standard deviation, changing with depth), "uniform" (defined by minimum and maximum values, changing with depth) and "gamma" (gamma distribution, defined by shape and scale parameter and constant offset, all changing with depth)

populations

numeric value, number of populations to create. The number of populations to add should match the existing number of populations.

Value

A list object with all rules for a model run.

Author(s)

Michael Dietze, GFZ Potsdam (Germany), Sebastian Kreutzer, Geography & Earth Sciences, Aberystwyth University (United Kingdom)

Examples


## create simple true age-depth-relationship
book_1 <- get_RuleBook()

book_2 <- add_Rule(
 book = book_1, 
 name = "extrarule", 
 group = "general", 
 type = "normal", 
 populations = 1)
                

[Package sandbox version 0.2.1 Index]