I have a dataframe and would like to turn the values into variables.
I've tried using as.numeric(unlist...) to pull them out one by one (it's not a big list), but I'm looking for a better way.
This is my data
dataframe = structure(list(V1 = c(564.58, 7834.1, 134.2), file = structure(c(2L,
1L, 3L), .Label = c("Blue", "Red", "Yellow"), class = "factor")), class = "data.frame", row.names = c(NA,
-3L))
I'm looking to get this:
Red = 564.58
Blue = 7834.1
Yellow = 134.2
Can anyone suggest a better way to do this?