nterms {lazy.symbolic} | R Documentation |
Count the Number of Terms in an Expression
nterms(exp, debug = 0)
exp |
expression vector or matrix |
debug |
= 1 to print the intermediate result |
*************************************************************************
********** There is a discrepancy between this and find_terms. **********
*************************************************************************
A vector or matrix of the same size as the input
nterms( "((a)) - ((a)+(b)) + (a-b) - (x-y)*(((z+1)))" ) nterms("-a") nterms("+a") nterms("a+") nterms("(a)") nterms("x*a/(1-y)") nterms("-a+b-0") nterms(Simplify("-a+b-0")) nterms("a %p% b %m% c%t%d%T%e + f%@%g")