0

This is my dataframe that I create by using the read_excel

df<-read_excel("mymatrix.xlsx",col_types = c("date",rep("numeric", 9)))

df<-structure(list(Data = structure(c(1564704000, 1564617600, 1564531200, 
1564444800), class = c("POSIXct", "POSIXt"), tzone = "UTC"), 
    Histórico = c(33.15, 33.62, 34.04, 34.14), Fech. = c(33.15, 
    33.62, 34.04, 34.14), `Var.Dia (%)` = c(-1.4, -1.23, -0.29, 
    0), Abertura = c(33.15, 33.62, 34.04, 33.94), Mínimo = c(32.87, 
    33.4, 33.42, 33.75), Medio = c(33.14, 33.86, 33.82, 34.13
    ), Máximo = c(33.64, 34.26, 34.2, 34.33), Volume = c(62519848, 
    60214256, 92438124, 29051461), Negócios = c(7480, 7624, 10066, 
    4634)), row.names = c(NA, -4L), class = c("tbl_df", "tbl", 
"data.frame"))

I need change the class of the first column to date class and remove the "00:00:00". I dont want to work with POSIXct class.

Any help?

Laura
  • 675
  • 10
  • 32

0 Answers0