fftrees_define: Create FFT definitions

View source: R/fftrees_define.R

fftrees_defineR Documentation

Create FFT definitions

Description

fftrees_define defines fast-and-frugal trees (FFTs) either from the definitions provided or by applying algorithms (when no definitions are provided), and returns a modified FFTrees object that contains those definitions.

In most use cases, fftrees_define passes a new FFTrees object x either to fftrees_grow_fan (to create new FFTs by applying algorithms to data) or to fftrees_wordstofftrees (if my.tree is specified).

If an existing FFTrees object object or tree.definitions are provided as inputs, no new FFTs are created. When both arguments are provided, tree.definitions take priority over the FFTs in an existing object. Specifically,

  • If tree.definitions are provided, these are assigned to the FFTs of x.

  • If no tree.definitions are provided, but an existing FFTrees object object is provided, the trees from object are assigned to the FFTs of x.

Usage

fftrees_define(x, object = NULL, tree.definitions = NULL)

Arguments

x

The current FFTrees object (to be changed and returned).

object

An existing FFTrees object (with tree definitions).

tree.definitions

A data.frame. An optional hard-coded definition of FFTs (in the same format as in an FFTrees object). If specified, no new FFTs are created, but the tree definitions in object or x are replaced by the tree definitions provided and the current object is re-evaluated.

Value

An FFTrees object with tree definitions.

See Also

fftrees_create for creating FFTrees objects; fftrees_grow_fan for creating FFTs by applying algorithms to data; fftrees_wordstofftrees for creating FFTs from verbal descriptions; FFTrees for creating FFTs from and applying them to data.


ndphillips/FFTrees documentation built on April 25, 2024, 1:07 a.m.