Chris H
Chris H

Reputation: 11

How do I transfer a variable in the "Values" section to the "Data" section in R Studio?

Within R-Studio there are two headers within the Global Environment for "Data" and "Values". For some reason, one of my vectors is listed in the "Values" section and I need to transfer it to the "Data" section.

It appears as the variable "test" with a description of " num [1:51] 0 2 4 6 ...". I assume there is an easy way to transfer this to the "Data" section, but I have yet to find a solution.

Upvotes: 1

Views: 3630

Answers (1)

kulianne
kulianne

Reputation: 259

You can convert your vector to a data frame using test <- as.data.frame(test). that way, you can View() to see the whole list. You could also print the vector in the console by just typing the name of the vector (test) in the console and hitting enter, this would show the data contained in the vector without changing the format.

Upvotes: 0

Related Questions