This is probably more complicated than it needs to be but it works.
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
DF <- data.frame(Color = c("Y", "Y", "R", "R", "R", "B", "B", "B", "B","BL",
"W", "W", "G"),
VALUE = c(1,0,NA,0,0,1,1,0,0,0,0,0,0))
DF$Color <- factor(DF$Color, levels = c("Y", "R", "B", "BL", "W", "G"))
DF2 <- DF %>% group_by(Color) %>%
summarize(TheList = list(VALUE)) %>%
select(TheList)
FinalList <- DF2[[1]]
FinalList
#> [[1]]
#> [1] 1 0
#>
#> [[2]]
#> [1] NA 0 0
#>
#> [[3]]
#> [1] 1 1 0 0
#>
#> [[4]]
#> [1] 0
#>
#> [[5]]
#> [1] 0 0
#>
#> [[6]]
#> [1] 0
Created on 2020-06-07 by the reprex package (v0.3.0)