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

Description Usage Arguments Details Value Examples

View source: R/domain.R

Description

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

Usage

1

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

1
2
3
4
5
6
7
8
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)")

sqyu/genscore documentation built on April 30, 2020, 4:27 a.m.