Say we have the following data frame:
> df A B C 1 1 2 3 2 4 5 6 3 7 8 9
We can select column \'B\' from its index:
&g
The following will do it:
which(colnames(df)=="B")