I am relatively new user in R - and I seem stuck on what should be fairly easy, I am just not finding the problem in my code set-up. I am trying to create a legend on a simply box plot but I cannot get it to line up correctly, without overlaying itself.
My box plot:
boxplot(OS, main='Computer Users Surveyed', xlab='Program Used', ylab= "Seconds (s)", col=c('blue', 'gold1'))
Then when I add a legend:
legend("topright", c("linux", "windows"), border="black", fill = "blue", "gold1")
All it does is show me a blue square with the words gold1 - instead of double stacking the Linux and windows groups with the corresponding colors.