Trying to create a data.frame like this:
a = "foo"
bar = data.frame(a = 1:3)
But the name of the column is a, not foo:
> bar
a
1 1
2 2
3 3
The column can be renamed after creating data.frame, but how to easily assign it's name by a variable just in the same data.frame command?