Imagine we have:
X <- 1:4
names(X) <- c("A" ,"B" , "C", "D")
I would like to create four objects in the global environment, A, B, C, D, each with the corresponding values 1, 2, 3, 4. I assume the solution involves the assign and apply functions but hope someone here could come up with something nicer than I could.
(Context: I'd like to create a kind of pseudo make file, based around a named character vector in which the names are the names of the objects I'd like to create, and the values are the names and locations of csv files I'd like to populate each object with... The toy example above is a step towards this.)