some-datatable$newcolumn <-
sapply(some-datatable$oldcolumn,
function-to-be-called-on-each-member-of-the-column)

from colourname-void-piechart-from-CSV.R:

# function to be called on each element of the colour column
tc <-
     function(x) {
         return (head(color.id(x),n=1))
     }
...
data3$colourname <- sapply(data3$colour, tc)
# easy peasy right?

Leave a comment on github