I am trying to plot a bar graph of race data for different Illinois Counties in r but I am having quite a bit of trouble. Here is my data: http://pastebin.com/rGKykjDb. I am a beginner in r. When I try to transpose the data it turn it to a vector of characters that can't be plotted. It seems that the only way to create bar plots is through columns and not rows. I would like my graph to look something similar to this. https://i.stack.imgur.com/oY3ew.png I've also tried looking at at this post on stackOverflow R - Creating Scatter Plot from Data Frame but when I tried to replcate it just gave me errors. Thanks for any advice that is given.
> cleanpop2 <-read.csv(file="test.csv",head=TRUE,sep=",")
> cleanpop2
Subject Total.population White
1 Illinois 12843166 9518017
2 Adams 67120 63402
3 Champaign 201332 155064
4 Cook 5200950 3011135
5 DeKalb 105201 89430
cleanpop4<-t(cleanpop2)
[,1] [,2]
Subject "Illinois" "Adams "
Total.population "12843166" " 67120"
White "9518017" " 63402"
Black "1968117" " 2807"
American.Indian "82449" "257"
plot(cleanpop4) Warning messages: 1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion 2: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
Is there any way for me to transpose the data without having all of my variables turn into strings?