nterms {lazy.symbolic}R Documentation

Count the Number of Terms in an Expression

Description

Count the Number of Terms in an Expression

Usage

nterms(exp, debug = 0)

Arguments

exp

expression vector or matrix

debug

= 1 to print the intermediate result

Details

*************************************************************************
********** There is a discrepancy between this and find_terms. **********
*************************************************************************

Value

A vector or matrix of the same size as the input

Examples

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")


[Package lazy.symbolic version 0.1.3 Index]