How to perform a *Fast* DCT (Discrete Cosine Transform) in R?
问题 Using Rprof revealed the dct in the dtt package to be the main offender in a piece of R code that was running quite slowly. Swapping it out for fft in the stats package (which is not the same transformation, but should take the same time to compute) my run time improved dramatically. In fact 2/3 of my Rprof lines were dct calls previously and a mere 3 lines of about 600 were fft calls after making the switch. Is the dct implementation in the dtt package not done using the fast discrete