'Output Index values as list or vector in R

I am trying to create a special plot using Plotly. In order to create it, I need values in the x-axis. I have a dataframe with typeof(SMI) = "double".

I need the column with the date in a vector or list. How can I do this?

Below is my code.

Thanks in advance. Greetings from Switzerland.

library(quantmod)
getSymbols("^SSMI", from = '2014-09-22',to= Sys.Date(),warnings = FALSE,auto.assign = TRUE)
SMI <- SSMI
SMI


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source