parse_ab {genscore} | R Documentation |
Parses an ab setting into rational numbers a and b.
Description
Parses an ab setting into rational numbers a and b.
Usage
parse_ab(s)
Arguments
s |
A string starting with "ab_", followed by rational numbers a and b separated by "_". a and b must be integers or rational numbers of the form "int/int". See examples. |
Value
A list of the following elements:
a_numer |
The numerator of |
a_denom |
The denominator of |
b_numer |
The numerator of |
b_denom |
The denominator of |
Examples
parse_ab("ab_1_1") # gaussian: a = 1, b = 1
parse_ab("ab_2_5/4") # a = 2, b = 5/4
parse_ab("ab_5/4_3/2") # a = 5/4, b = 3/2
parse_ab("ab_3/2_0/0") # a = 3/2, b = 0/0 (log)
parse_ab("ab_1/2_0/0") # exp: a = 1/2, b = 0/0 (log)
[Package genscore version 1.0.2.2 Index]