Commands for colouring in categories in R in different colours?

I need to colour in some categories in the same colour in a boxplot in R but have no clue how to do so. There are 8 categories and i need 4 of them in one colour, 2 in another colour and the remaining two one colour each. The problem i have is that they are not in order, i.e. 1,5-one colour, 3,4,6,8 one colour and then 7-one colour and 2-one colour. ANY HELP?????


You can use the col argument to boxplot:

boxplot(count~spray, data=InsectSprays, col=c("white", "green", "green", "white", "blue", "yellow"))

Need Your Help

websocket client intermittently fails to transmit when making rapid calls to socket.send()

javascript node.js tcp websocket

I have a websocket server and client. I am able to establish a connection and transmit messages(data) in both directions. However, when a client running in a web browser rapidly makes calls to

How do I create and save an expiring user token in node js?

node.js mongodb passwords mongoose

Hi so I have come across this for creating a random token on crypto for Node js.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.