Prueba_F
  • AI Chat
  • Code
  • Report
  • Spinner
    library("dplyr")
    library("tidyr")
    library("readxl")
    library("ggplot2")
    library("reshape2")
    Prueba_fin <- read.csv("Prueba.csv",header = FALSE)
    Prueba_fin2 <- as.data.frame(t(Prueba_fin))
    Prueba_fin3 <- Prueba_fin2[-1,]
    names(Prueba_fin3) <- Prueba_fin3[1,]
    Prueba_fin4 <- Prueba_fin3[-1,]
    colnames(Prueba_fin4)[1]  <- "Fechas"
    colnames(Prueba_fin4)[2]  <- "Local_RCL"
    Prueba_fin4 %>% select(Fechas)
    Prueba_fin4 %>% select(Local_RCL)
    Prueba_fin4$Local_RCL <- gsub('%', '', Prueba_fin4$Local_RCL)
    class(Prueba_fin4$Local_RCL) = "Numeric"
    Prueba_fin4$Local_RCL<- as.numeric(as.character(Prueba_fin4$Local_RCL)) /100
    Prueba_fin4$Fechas <- as.Date(Prueba_fin4$Fechas, 
                                       format = "%Y/%m/%d")
    
    Prueba_fin4