title: BARPLOT in R and proportions
body: <p>The question i have to solve is this  </p>
  
  <blockquote>
    <p>"Using the simple graphing functions in R, create a bar chart
    displaying the proportion of gun unsolved homicides by year, from 1980
    to 2015. Describe any trends you see."</p>
  </blockquote>
  
  <p>First to create the Barplot, i create a subset of the data to only select unsolved mysteries from the large data set which works fine. </p>
  
  <pre><code>unsolvedCASES&lt;-subset(dataset,Crime.Solved =="No")
  </code></pre>
  
  <p><code>dput(head(unsolvedCASES, 20))</code>
  But when i go to make a basic barplot using the function below the whole plot is black </p>
  
  <pre><code>barplot(dataset$Crime.Solved == "No", 
          main = "Unsolved Homicides by Year, from 1980 to 2015",
          xlab = "Year 1980-2015", ylab = "Number of Homicides", 
          names.arg = dataset$Year, col = rainbow(3))
  </code></pre>
  
  <p>or even</p>
  
  <pre><code>  barplot(unsolvedCASES$Year)
  </code></pre>
  
  <p>my first question is how do i make this bar plot show the number of unsolved cases per year AND THEN how do i show its proportions?</p>
  
  <p>I was given a hint for the proportions saying  </p>
  
  <blockquote>
    <p>"This proportion is also known as the percentage of unsolved homicides
    for any specific year, and is easily obtained by dividing the number
    of unsolved homicides that year by the total number of homicides that
    year"</p>
  </blockquote>
  
  <p>if that helps.</p>
  
  <p>your help is greatly appreciated !!!
  THANKS!!</p>
  
  <p>C:\Users\erinl\Downloads\Homicides .htm</p>