bupaR changing animation color based on column value

21 Views Asked by At

I'm trying to change the color of the animation token based on a column value of the data.

The idea is if we have the first character in the first column value as "n", we have one colour, or "b" its a different color.

This is the code we currently use for animation :

animate_process(the_output,mode = "relative", jitter=10, legend = "color",mapping= token_aes(color = token_scale("column1", scale = "ordinal",range = RColorBrewer::brewer.pal(12, "Paired")))) 

Any help appreciated.

0

There are 0 best solutions below