How to convert time series into a column [duplicate]
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?
r dataframe time-series
marked as duplicate by M-M, m0nhawk, MLavoie, Unheilig, camille Nov 21 '18 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.
add a comment |
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?
r dataframe time-series
marked as duplicate by M-M, m0nhawk, MLavoie, Unheilig, camille Nov 21 '18 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 ofdput(head(z))
.
– markus
Nov 20 '18 at 20:19
add a comment |
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?
r dataframe time-series
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?
This question already has an answer here:
Convert row names into first column
4 answers
r dataframe time-series
r dataframe time-series
edited Nov 20 '18 at 20:20
markus
10.8k1029
10.8k1029
asked Nov 20 '18 at 20:08
Arpan Ganguli
417
417
marked as duplicate by M-M, m0nhawk, MLavoie, Unheilig, camille Nov 21 '18 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 '18 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 ofdput(head(z))
.
– markus
Nov 20 '18 at 20:19
add a comment |
1
Please share the output ofdput(head(z))
.
– markus
Nov 20 '18 at 20:19
1
1
Please share the output of
dput(head(z))
.– markus
Nov 20 '18 at 20:19
Please share the output of
dput(head(z))
.– markus
Nov 20 '18 at 20:19
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
add a comment |
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.
add a comment |
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.
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.
edited Nov 20 '18 at 21:12
answered Nov 20 '18 at 21:07
TeeKea
3,17741530
3,17741530
add a comment |
add a comment |
1
Please share the output of
dput(head(z))
.– markus
Nov 20 '18 at 20:19