I have some data which looks like this (fake data for example\'s sake):
dressId color
6 yellow
9 red
10 green
split.data.frame is a good way to organize this; then extract the color component.
d <- data.frame(dressId=c(6,9,10,10,10,12,12),
color=factor(c("yellow","red","green",
"purple","yellow",
"purple","red"),
levels=c("red","orange","yellow",
"green","blue","purple")))
I think the version you want is actually this:
ss <- split.data.frame(d,d$dressId)
You can get something more like the list you requested by extracting the color component:
lapply(ss,"[[","color")