fft_stats() and mvfft_stats() take the same arguments, check them the
same way and return the same structure as stats::fft() and
stats::mvfft(): the attributes of z are kept, the inverse is not
scaled, and inputs of length 0 or 1 come back unchanged (as complex). The
values agree to rounding. The differences: every length runs in
O(n log n) (R's code is quadratic in a large prime factor), real input
uses a real transform, and threads follow
fft_workers().
Arguments
- z
A real or complex vector or array (
fft_stats()), or matrix (mvfft_stats()).- inverse
TRUEfor the unnormalised inverse transform.NAmeans forward, as instats::fft().