Hi! I hope someone could help me to understand the following error. I have to calculate the Nelson-Siegel Interest rates. First, I find the parameters (function "Nelson.Siegel()"), than I have to use the function "NSrates()". I use as coefficient the parameters and as maturity the vector of my maturities, but R gives me this:

Error in xts(matrix(0, nrow(Coeff), length(maturity)), order.by = time(Coeff)) : order.by requires an appropriate time-based object

How can I overcome the problem?? Thanks!