Use do.call
and as.list
to pass the data to the relevant arguments of hsv
:
do.call(hsv,as.list(hsvc[,1]))
[1] "#FFB3B3"
plot(1,1, pch=20, col=do.call(hsv,as.list(hsvc[,1]))) # light red dot
To do this for all you data:
plot(mydata,col=apply(hsvc,2,function(x) do.call(hsv,as.list(x)))) # a symphony of red
But it appears that the remapping has not worked correctly, since the intensity changes do not work in the same direction.