Probably a fairly simple question, but couldn't find anything specific for it. Lets say I have the following data frame
A
Hello World
1 5 6
2 5 6
If you want to fetch the the values from the Hello column you would usually just do it with
A$Hello
But is there a way to fetch the column values with a predefined variable like this?
col <- "Hello"
A$col
The latter returns NULL for me