Change date in xts

Hey,
I need help changing the dates in my dataset. Im pairing two variables from my dataset df using these codes.

enrg_noe = cor1[2,1,]
enrg_noe = as.xts(enrg_noe)

The dates in my xts is starting from "1970-01-02" which is far from my original dates stored in the df

I have tried to use:
enrg_noe = as.xts(enrg_noe, order_by= df$date)
where "date" is my original dates.

Do anyone have some ideas on how we can change the period?

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.