title: How to change rCharts Highchart Color based on Factor Variable
body: <p>This is my first time posting a question on Stack Overflow. I will do my best to make this understandable.</p>
  
  <p>I do not have enough rep to post an image...So I will describe what I have and what I want. I have an rCharts Highchart (must be this format) that is a barchart with 29 School Names as the categories and the value is Number of Children at each school. As there is only 1 series, all of the bars are the same color.</p>
  
  <p>I need to change the color of specific bars based on a factor variable (type of school). I basically want to know if there is an equivalent to the fill=factor_variable in ggplot2. I do not want to make each different school type a series because I want to keep the school names along the axis. </p>
  
  <p>Here is my code</p>
  
  <pre><code>agencyc &lt;- rCharts:::Highcharts$new()
  agencyc$chart(height=700, width=1000)
  agencyc$title(text = "Number of Children at Agencies")
  agencyc$subtitle(text = "2014/2015 Initiative Averages")
  agencyc$xAxis(categories=stuagencycount$AgencyName)
  agencyc$yAxis(title = list(text = "Number of Children"))
  agencyc$data(x = stuagencycount$AgencyName, y = stuagencycount$Count, 
  type = "bar", name = "Population", color="lightgreen")
  agencyc$tooltip(headerFormat = "#! '' !#", valueDecimals=0, 
  valueSuffix="Children")
  agencyc$exporting(enabled = T)
  agencyc$legend(enabled=F)
  agencyc$print()
  agencyc
  </code></pre>
  
  <p>Thanks for the help, 
  may the force be with you</p>