In the following .RData file:
https://www.dropbox.com/s/ct6ttye8mmci22v/Test_Data_Colours.RData?dl=0
I'm looking to convert the dataframe b
into a structured, dictionary list (an example of which is shown in my_colour[["CellType"]]
).
I've tried:
xy.list <- setNames(split(b, seq(nrow(b))), rownames(b))
But it does not give the desired result, and I am not sure how to do this. Is there a simple and/or short way of achieving the conversion?