Dates in graph R biwavelet

We are performing a wavelet coherence analysis through the 'biwavelet' package in R Studio. The time-series used as data is fund return and number of observations. When we plot the power spectrum we end up with number of data entries (number of days) in the x-axis. We are however interested in converting this to year-month points in the graph, instead of 100, 200... 500. (See picture below how it looks now)

The code that we use, could originally be found in Ibn Abdullahs post: RPubs - Wavelet Coherence using R

The error message we get when we import dates instead of numbers is:
Error in r[i1] - r[-length(r):-(length(r) - lag + 1L)] : non-numeric argument to binary operator

Is there any simple way to use the dates directly or to convert the numbers in the plot to dates?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.