minmax {lfl}R Documentation

Creating linguistic context directly from values

Description

This function creates a context (i.e. an instance of S3 class ctx3(), ctx3bilat(), ctx5(), or ctx5bilat()) based on values of the numeric vector x. In default, the context is based on minimum and maximum value of x in the following way:

Usage

minmax(x, type = c("ctx3", "ctx5", "ctx3bilat", "ctx5bilat"), ...)

Arguments

x

A numeric vector to compute the context from

type

A type of the context to be returned. Must be one of: ctx3, ctx5, ctx3bilat or ctx5bilat

...

other parameters to be passed to the appropriate constructor (ctx3(), ctx3bilat(), ctx5(), and ctx5bilat()) that is called internally. These values overwrite the defaults computed by minmax – see the examples.

Details

Other values are computed accordingly to defaults as defined in the constructors ctx3(), ctx3bilat(), ctx5(), and ctx5bilat()).

Examples

  minmax(0:100)                # returns ctx3: 0, 50, 100
  minmax(0:100, high=80)       # returns ctx3: 0, 40, 80
  minmax(0:100, relCenter=0.4) # returns ctx3: 0, 40, 100
  minmax(0:100, type='ctx5')   # returns ctx5: 0, 25, 50, 75, 100

[Package lfl version 2.2.0 Index]