Hi, Thank you for the function. I was trying to use the decompose function, but the program cannot run as there were several missing values in my data frame. Could someone advice me the way to handle on this matter? Thanks F