How to select certain columns within a dataframe without using numbers in brackets?

Is there any way to select specific columns in these brackets [
] without using numbers? I.e., let' s say I have a column named "%Match" of a dataframe called "data" and I want to see all row values of that column, and let's say it has position 3. I could write data[,3], but is it in any way possible to instead use the column name, i.e., I would like to write data[,data$%Match] but that doesn't work.

If %Match is the third column...

dat[,"%Match"] equivalent to...


Ah ok, thank you Sir!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.