Next: tsplot()
Up: Time Series Macros Help
Previous: spectrum()
Contents
Usage:
testnfreq(nfreq), nfreq a vector of positive integers
|
Keywords:
fourier transforms
testnfreq(nfreq) returns a LOGICAL vector the same length as nfreq, a
vector of positive integers. Element j of the result is True if and
only if nfreq[j] has no prime factors > 29.
testnfreq() is useful in macros which use one of the fast Fourier
transform functions, rft(), dft() and hft(), since these operate only on
vectors or matrices x for which nrows(x) has no prime factors > 29. It
allows you to test whether this condition is true.
The use of testnfreq() is deprecated since goodfactors() can be used in
an equivalent test. When N is a scalar, goodfactors(N) == N is True if
and only if testnfreq(N) is true. Moreover, the value of goodfactors(N)
is the next integer >= N with no prime factors > 29.
Example:
if (!testnfreq(nrows(y))){
error("nrows(y) has prime factor > 29")
}else{
yft <- rft(y)
}
See also topics goodfactors(), primefactors(), rft(), hft(), cft(),
'fourier'
Gary Oehlert
2003-01-15