Debian Codegraph @

man/nr.sign.chg.Rd

raw
1 \name{nr.sign.chg}
2 \alias{nr.sign.chg}
3 \title{Number of Sign Changes in Sequence}
4 \description{
5 Compute the number of sign changes in the sequence \code{y}.
6 }
7 \usage{
8 nr.sign.chg(y)
9 }
10 \arguments{
11 \item{y}{numeric vector.}
12 }
13 \value{
14 an integer giving the number of sign changes in sequence \code{y}.
15 Note that going from positive to 0 to positive is \emph{not} a sign change.
16 }
17 \author{Martin Maechler, 17 Feb 1993.}
18 \examples{
19 (y <- c(1:2,1:-1,0:-2))
20 nr.sign.chg(y)## = 1
21 }
22 \keyword{arith}