How could be possible to represent (plot and numerically) a sawthooth signal in R from:
y <- c(NA,NA,NA,NA,1,NA,NA,NA,1,NA,NA,NA,NA,NA,1,NA,NA,NA,NA,1,NA)
where 1 represents in y
the time points when the sawtooth achieves a peak (obviously to 1). Note that the distance between peaks are unequal.
I thought about using interpolation but maybe it is unnecessary.
Thank you,