Re: [R] color code from csv

2008-10-06 Thread Ivar Herfindal
Paul Hiemstra skrev: kerfuffle wrote: hi folks, this is driving me up the wall. Apologies for posting twice in the same week, I'm writing up a thesis. I wish to color-code some dots in an xy plot. I've got a csv file with various elements, one of which is the color-key (with the header 'co

Re: [R] color code from csv

2008-10-06 Thread Paul Hiemstra
kerfuffle wrote: hi folks, this is driving me up the wall. Apologies for posting twice in the same week, I'm writing up a thesis. I wish to color-code some dots in an xy plot. I've got a csv file with various elements, one of which is the color-key (with the header 'color'). If the color-key

Re: [R] color code from csv

2008-10-05 Thread Jim Lemon
kerfuffle wrote: hi folks, this is driving me up the wall. Apologies for posting twice in the same week, I'm writing up a thesis. I wish to color-code some dots in an xy plot. I've got a csv file with various elements, one of which is the color-key (with the header 'color'). If the color-key

Re: [R] color code from csv

2008-10-03 Thread Yihui Xie
So you have two problems: (1) integers to colors (2) hexadecimal values to colors They are quite different problems, I think. For the first one, you have to look at ?palette to know how integers are mapped to colors via the palette; and the second problem seems to be that 'read.csv()' has treated

Re: [R] color code from csv

2008-10-03 Thread hadley wickham
On Fri, Oct 3, 2008 at 2:10 PM, kerfuffle <[EMAIL PROTECTED]> wrote: > > hi folks, > > this is driving me up the wall. Apologies for posting twice in the same > week, I'm writing up a thesis. I wish to color-code some dots in an xy > plot. I've got a csv file with various elements, one of which

Re: [R] color code from csv

2008-10-03 Thread Sarah Goslee
Hi, I don't know how to get R to use the hex codes, but as an alternative strategy you can use colors() to get a (much longer than 8) list of all the colors that R "knows", and use that with your index: plot(x, y, col=colors()[datacolor]) It takes a bit of fiddling to get distinguishable colors

[R] color code from csv

2008-10-03 Thread kerfuffle
hi folks, this is driving me up the wall. Apologies for posting twice in the same week, I'm writing up a thesis. I wish to color-code some dots in an xy plot. I've got a csv file with various elements, one of which is the color-key (with the header 'color'). If the color-key is decimal (eg. 1