powered by
spray
Number of nonzero terms in a spray object
nterms(x) # S3 method for spray length(x)
Object of class spray
Robin K. S. Hankin
Number of nonzero terms in a spray object. Function length() is defined so that seq_along() works as expected
length()
seq_along()
(a <- rspray()) nterms(a) seq_along(a)
Run the code above in your browser using DataLab