const: Indicator function multiplied by a constant.

Description Usage Arguments Value Author(s) Examples

View source: R/ppstat.R

Description

This function is a simple wrapper intended to be used in a formula specification for generalized linear point process models.

Usage

1
const(x, y, c = 1)

Arguments

x

a numeric.

y

an optional numeric.

c

an optional numeric.

Value

The function returns a numeric of the same length as x. The result is constantly equal to c if y is missing. If y is not missing the result is the vector c * as.numeric(x <= y).

Author(s)

Niels Richard Hansen, Niels.R.Hansen@math.ku.dk

Examples

1
2
3
4
const(5)
const(10, 5)
const(5, 10)
const(1:10, rep(5,10), 2)

ppstat documentation built on May 2, 2019, 5:26 p.m.