Skip to contents

Appends a proposition and a provenance entry. R does not change the theory in place, so assign the result.

Usage

tf_add_proposition(
  theory,
  id,
  from,
  to,
  relation,
  mechanism = NULL,
  functional_form = NULL
)

Arguments

theory

A theory object (named list).

id, from, to, relation

Proposition fields. relation is one of "increases", "decreases", "causes", "mediates", "moderates" or "associates".

mechanism

Optional statement of why the relation holds.

functional_form

Optional description of the relation's shape.

Value

The theory with the proposition added.

Examples

tf_theory("demo-1", "A demonstration theory") |>
  tf_add_proposition("p1", "c_arousal", "c_threat", "increases",
                     mechanism = "Bodily cues are read as danger.")
#> $schema_version
#> [1] "1.1"
#> 
#> $id
#> [1] "demo-1"
#> 
#> $title
#> [1] "A demonstration theory"
#> 
#> $maturity
#> [1] "building"
#> 
#> $theory_form
#> [1] "network"
#> 
#> $provenance
#> $provenance[[1]]
#> $provenance[[1]]$step
#> [1] "1"
#> 
#> $provenance[[1]]$action
#> [1] "tf_theory"
#> 
#> $provenance[[1]]$detail
#> [1] "demo-1"
#> 
#> 
#> $provenance[[2]]
#> $provenance[[2]]$step
#> [1] "2"
#> 
#> $provenance[[2]]$action
#> [1] "tf_add_proposition"
#> 
#> $provenance[[2]]$detail
#> [1] "p1"
#> 
#> 
#> 
#> $propositions
#> $propositions[[1]]
#> $propositions[[1]]$id
#> [1] "p1"
#> 
#> $propositions[[1]]$from
#> [1] "c_arousal"
#> 
#> $propositions[[1]]$to
#> [1] "c_threat"
#> 
#> $propositions[[1]]$relation
#> [1] "increases"
#> 
#> $propositions[[1]]$mechanism
#> [1] "Bodily cues are read as danger."
#> 
#> 
#>