Learn R Programming

term (version 0.1.0)

nterms: Number of Terms

Description

Gets the number of unique term elements of an object.

Usage

nterms(x, ...)

# S3 method for term nterms(x, ...)

Arguments

x

The object.

...

Unused.

Value

A count of the number of terms.

Methods (by class)

  • term: Number of unique term elements of term vector

Details

By default if the vector includes missing values then it returns NA_integer_.

See Also

term-vector()

Examples

Run this code
# NOT RUN {
nterms(as.term(c("alpha[1]", "alpha[2]", "beta[1,1]", "beta[2,1]")))
nterms(as.term(c("alpha[1]", "alpha[1]", "beta[1,1]", "beta[1,1]")))
# }

Run the code above in your browser using DataLab