x <- 1:100
y <- decimate(x, 2, ftype = "fir")
y
# compare with signal package
z <- gsignal::decimate(x, 2, ftype = "fir")
# Compare decimated results
plot(x, type = 'l')
points(seq(1,100, 2), y, col = "green")
points(seq(1,100, 2), z, col = "red")
Run the code above in your browser using DataLab