Confused student
Confused student

Reputation: 1

Extract a column from a dataframe in R?

Lets say that I have a dataframe (resid) that looks like this:

                            [,1]
1970-01-02 01:00:00  9.958329261
1970-01-03 01:00:00 -4.219493148
1970-01-04 01:00:00  2.188976400
1970-01-05 01:00:00 -0.992230006
...

I would like to create a vector containing only the left side column. Is there a way for me to do this?

Upvotes: 0

Views: 103

Answers (1)

nico
nico

Reputation: 51640

Simply use (assuming your dataframe is called df):

times <- rownames(df)

Upvotes: 1

Related Questions