I have a dataset "rates" as below: 

```
       Date  Price
1 2012-11-01 6.2411
2 2012-11-02 6.2415
3 2012-11-05 6.2454
4 2012-11-06 6.2456
5 2012-11-07 6.2437
6 2012-11-08 6.2429

> class(rate)
[1] "data.frame"

```

And try to transfer this dataset in to time series data by using R code:

```
rate<-ts(data = rate, start =1, freq=1)
> class(rate)
[1] "mts"    "ts"     "matrix"

> head(rate)
     Date  Price
[1,] 15645 6.2411
[2,] 15646 6.2415
[3,] 15649 6.2454
[4,] 15650 6.2456
[5,] 15651 6.2437
[6,] 15652 6.2429

```

As you can see, the dates become numbers. Thus I use the as.date() function:

```
rate[,1] <- as.Date(rate[,1],origin = "1899-12-30")
> head(rate)
       Date  Price
[1,] -719162 6.2411
[2,] -718797 6.2415
[3,] -718432 6.2454
[4,] -718067 6.2456
[5,] -717701 6.2437
[6,] -717336 6.2429

```

Is there anyone could help me with this problem? Thank you.