read_uniform_term: Attempts to parse a single term in x into power_numer and...

View source: R/domain.R

read_uniform_termR Documentation

Attempts to parse a single term in x into power_numer and power_denom.

Description

Attempts to parse a single term in x into power_numer and power_denom.

Usage

read_uniform_term(s)

Arguments

s

A string, the variable side of an inequality expression. Please refer to make_domain().

Details

Returns NULL if s is not a single uniform term in x (e.g. x^2 is uniform, while x1^2+x2^2 is not uniform).

Value

power_numers

The uniform numerator in the power (e.g. -2 for x^(-2/3)).

power_denoms

The uniform denominator in the power (e.g. 3 for x^(-2/3)).

Examples

p <- 30
read_uniform_term("x^2")
read_uniform_term("x^(1/3)")
read_uniform_term("exp(x)")
read_uniform_term("log(x)")
read_uniform_term("x^(-2/3)")
read_uniform_term("x")
read_uniform_term("exp(-23x)")

genscore documentation built on May 31, 2023, 6:28 p.m.