My data frame looks like that (with more columns and rows):
DT
Date PERMNO lag.ME.Jun
<S3: yearmon> <fctr> <dbl>
1 Gen 2000 34936 21.860
2 Feb 2000 34936 21.860
3 Mar 2000 34936 21.860
Then I create different time series for each column (for the variable lag.ME.Jun, for example):
v6<-xts( newdata11$lag.ME.Jun, newdata11$Date)
However, it adds also the date and time inside the time series; which was not provided. So v6 looks like:
34936
2000-01-01 01:00:00 21.86
2000-02-01 01:00:00 21.86
2000-03-01 01:00:00 21.86
How can I avoid to have the day and time in the time to appear in the time series? only the month and year.