I have a data frame in R like this:
> df <- data.frame(cbind(C.01=1, C.02=1:8, C.03=c("A","B","C","D","E","F","G","H")))
And I would obtain a subset like this:
> subset(df, C.03 == "A")
C.01 C.02 C.03
1 1 1 A
It's possible do the same subset but having the name of the column in xx <- "C.03"
??
Because subset(df, xx == "A")
doesn't works.
Thnks.