How to convert time series into a column [duplicate]












-3















This question already has an answer here:




  • Convert row names into first column

    4 answers




I the following dataset that I downloaded from Yahoo! Finance (and did some basic manipulations). My question is - How do I convert the time column into the dataset into a column of the dataset?



enter image description here










share|improve this question















marked as duplicate by M-M, m0nhawk, MLavoie, Unheilig, camille Nov 21 at 16:03


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











  • 1




    Please share the output of dput(head(z)).
    – markus
    Nov 20 at 20:19
















-3















This question already has an answer here:




  • Convert row names into first column

    4 answers




I the following dataset that I downloaded from Yahoo! Finance (and did some basic manipulations). My question is - How do I convert the time column into the dataset into a column of the dataset?



enter image description here










share|improve this question















marked as duplicate by M-M, m0nhawk, MLavoie, Unheilig, camille Nov 21 at 16:03


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











  • 1




    Please share the output of dput(head(z)).
    – markus
    Nov 20 at 20:19














-3












-3








-3








This question already has an answer here:




  • Convert row names into first column

    4 answers




I the following dataset that I downloaded from Yahoo! Finance (and did some basic manipulations). My question is - How do I convert the time column into the dataset into a column of the dataset?



enter image description here










share|improve this question
















This question already has an answer here:




  • Convert row names into first column

    4 answers




I the following dataset that I downloaded from Yahoo! Finance (and did some basic manipulations). My question is - How do I convert the time column into the dataset into a column of the dataset?



enter image description here





This question already has an answer here:




  • Convert row names into first column

    4 answers








r dataframe time-series






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 at 20:20









markus

10.5k929




10.5k929










asked Nov 20 at 20:08









Arpan Ganguli

417




417




marked as duplicate by M-M, m0nhawk, MLavoie, Unheilig, camille Nov 21 at 16:03


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by M-M, m0nhawk, MLavoie, Unheilig, camille Nov 21 at 16:03


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1




    Please share the output of dput(head(z)).
    – markus
    Nov 20 at 20:19














  • 1




    Please share the output of dput(head(z)).
    – markus
    Nov 20 at 20:19








1




1




Please share the output of dput(head(z)).
– markus
Nov 20 at 20:19




Please share the output of dput(head(z)).
– markus
Nov 20 at 20:19












1 Answer
1






active

oldest

votes


















0














Looks like you want to transpose the data frame. You may do that as follows:



df.t <- as.data.frame(t(z))
colnames(df.t) <- rownames(z)
rownames(df.t) <- c()


Hope it helps.






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Looks like you want to transpose the data frame. You may do that as follows:



    df.t <- as.data.frame(t(z))
    colnames(df.t) <- rownames(z)
    rownames(df.t) <- c()


    Hope it helps.






    share|improve this answer




























      0














      Looks like you want to transpose the data frame. You may do that as follows:



      df.t <- as.data.frame(t(z))
      colnames(df.t) <- rownames(z)
      rownames(df.t) <- c()


      Hope it helps.






      share|improve this answer


























        0












        0








        0






        Looks like you want to transpose the data frame. You may do that as follows:



        df.t <- as.data.frame(t(z))
        colnames(df.t) <- rownames(z)
        rownames(df.t) <- c()


        Hope it helps.






        share|improve this answer














        Looks like you want to transpose the data frame. You may do that as follows:



        df.t <- as.data.frame(t(z))
        colnames(df.t) <- rownames(z)
        rownames(df.t) <- c()


        Hope it helps.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 20 at 21:12

























        answered Nov 20 at 21:07









        TeeKea

        3,19541430




        3,19541430















            Popular posts from this blog

            Wiesbaden

            Marschland

            Dieringhausen