R has a function called filtfilt that performs zero-phase digital filtering by processing the input data in both the forward and reverse directions. But it suffers from having steep transition bands. Specifically, the output signal exhibits excessive transient response. The version of filtfilt in Octave apparently handles initial conditions better in a way such that startup and end transients are minimized.
It would be great to have the Octave version of filtfilt coded in R. Someone has already tried, but it generated an error (https://dankelley.github.io/r/2014/02/19/filtfilt.html). Has anyone attempted to code this? Using the same data, results should be identical in R as in Octave