Skip to content
Prev 180058 / 398502 Next

From two colors to 01 sequences

Dear All,

Perhaps, what I am asking is impossible, but I am asking it anyway.

I have got several pdf files with rows of colored rectangles: red
rectangles should be read as 0; green rectangles as 1. No other color
exists. Is there some way to have R reading the colored rectangles to
a matrix or data frame converting the color of the rectangles to
sequences of 01?

Thanks in advance,

Paul