Re: [R] Canadian politcal party colours in ggplot2

2013-04-05 Thread John Kane
y when we lost it. John Kane Kingston ON Canada > -Original Message- > From: murdoch.dun...@gmail.com > Sent: Wed, 03 Apr 2013 09:58:45 -0400 > To: jrkrid...@inbox.com > Subject: Re: [R] Canadian politcal party colours in ggplot2 > > On 03/04/2013 9:08 AM, John K

Re: [R] Canadian politcal party colours in ggplot2

2013-04-05 Thread John Kane
ot of intensive analysis, as I was then, I'd go back to set options(stringsAsFactors=FALSE). John Kane Kingston ON Canada > -Original Message- > From: istaz...@gmail.com > Sent: Thu, 4 Apr 2013 11:18:53 -0400 > To: jrkrid...@inbox.com > Subject: Re: [R] Canadia

Re: [R] Canadian politcal party colours in ggplot2

2013-04-04 Thread Ista Zahn
t though for other >>> readers, your example seems to assign the Canadian Alliance colours to >>> the NDP. Quelle horreur! >>> >>> John Kane >>> Kingston ON Canada >>> >>> >>>> -Original Message- >>>>

Re: [R] Canadian politcal party colours in ggplot2

2013-04-04 Thread John Kane
8:10:07 -0400 > To: jrkrid...@inbox.com > Subject: Re: [R] Canadian politcal party colours in ggplot2 > > Hey John, > > Yeah, I guess my blind trust in wikipedia got me in trouble this time. > The wikipedia colors are not the official colors, or maybe they just > contain erro

Re: [R] Canadian politcal party colours in ggplot2

2013-04-04 Thread Ista Zahn
s to assign the Canadian Alliance colours to the NDP. > Quelle horreur! > > John Kane > Kingston ON Canada > > >> -Original Message- >> From: istaz...@gmail.com >> Sent: Wed, 3 Apr 2013 09:43:25 -0400 >> To: jrkrid...@inbox.com >> Subject: R

Re: [R] Canadian politcal party colours in ggplot2

2013-04-04 Thread John Kane
Kingston ON Canada > -Original Message- > From: istaz...@gmail.com > Sent: Wed, 3 Apr 2013 09:43:25 -0400 > To: jrkrid...@inbox.com > Subject: Re: [R] Canadian politcal party colours in ggplot2 > > Hi John, > > How about this: > > library(XML) > &

Re: [R] Canadian politcal party colours in ggplot2

2013-04-03 Thread Duncan Murdoch
On 03/04/2013 9:08 AM, John Kane wrote: A stupid question but does anyone know how to express the actual colours used by the main Canadian political parties? I want to do a couple of ggplot2 plots and have lines or rectangles that accurately reflect the party colours. I can probably play aro

Re: [R] Canadian politcal party colours in ggplot2

2013-04-03 Thread Ista Zahn
Hi John, How about this: library(XML) party.info <- readHTMLTable("http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Political_parties_and_politicians_in_Canada/list_of_parties";) fed.party.info <- party.info[[3]] fed.party.colors <- fed.party.info[, 2] names(fed.party.colors) <- gsub("^.*\\|"

[R] Canadian politcal party colours in ggplot2

2013-04-03 Thread John Kane
A stupid question but does anyone know how to express the actual colours used by the main Canadian political parties? I want to do a couple of ggplot2 plots and have lines or rectangles that accurately reflect the party colours. I can probably play around with RColorBrewer or something to fig