I need to create a dataframe and passing the name of the columns with variables.
Now, I can do: df$name1 df$name2
BUT
How to do the same thing having 'name1' and 'name2‘ in a variable? How can I do some thing like:
df$THE_VARIABLE (that have the name of the column)
To do this, use the
[[operator:Here is an example using
iris: