canonise_expression: Used to recognize similar expressions and to possibly...

Description Usage Arguments Value

View source: R/fitting.R


It's best to simplify algebraic expression a little before evaluating.





The input is assumed to be a character consisting of one or more terms. Each term starts with either + or - and after that contains one or more factors separated by *. Each factor is either an admix variable, a number or a clause (1 - x) (mind the spaces, this is how the function f4 outputs), where x is again either an admix variable or a number. Everything is pretty much ruined if variable names are numbers or contain forbidden symbols +, -, *, (, ).


A polynomial in a canonical form with no parenthesis or spaces and the monomials in lexicographical order. If everything is cancelled out then +0.

mailund/admixture_graph documentation built on April 3, 2018, 9:28 p.m.