I have a very large data frame that I want to pull from to make smaller data frames based on specific conditions, but I'm not sure how to do this effectively. My data frame looks like this (but with hundreds more variables):
A B C D
CAT ABC 5 7
COW DEF 5 8
DOG GHI 5 8
BAT JKL 5 8
MAN MNO 6 8
HAT PQR 6 8
What I would like to do is create a data frame like this:
CAT.ABC.5.7 <- subset(df, A=="CAT", B=="ABC", C==5, D==7)
COW.DEF.5.8 <- subset(df, A=="COW", B=="DEF", C==5, D==8)
etc.
It is important that I have the data frames labeled like this so I can quickly "pull" them later based on the values I need.
Thank you!
CAT.DOG.TREE.5.7......WOTSIT.Q.FVAL?