I have a csv called stats with 4 columns, Accepted.Items, A, B, C.
Accepted.Items has rows with regular items: Soda can, banana, orange
While columns A,B and C contain either values 'NA' or 'Yellow'
I want to filter values with 'Yellow' for each A, B and C column and create separate data frames for each of them.
for (i in colnames(stats)) {
z <- stats[stats$i == "Yellow",]
z <- data.frame(z$Accepted.Items, z$i)
print(z)
}