How do I run a high pass or low pass filter on data points in R?
问题 I am a beginner in R and I have tried to find information about the following without finding anything. The green graph in the picture is composed by the red and yellow graphs. But let's say that I only have the data points of something like the green graph. How do I extract the low/high frequencies (i.e. approximately the red/yellow graphs) using a low pass/high pass filter? Update: The graph was generated with number_of_cycles = 2 max_y = 40 x = 1:500 a = number_of_cycles * 2*pi/length(x) y