title: Generating pdf for chisquared in R
body: <p>I want a visualize the pdf of chisquare distribution in R. I am okay with the plotting part, but it is difficult to get the dataframes. 
  What I want is a pdf of 100,000 random numbers having degrees of freedom 1,2,3,6. </p>
  
  <p>This is what I have tried.</p>
  
  <pre><code>set.seed(1)
  data.frame(chisq = 0:100000) 
  df1 = dchisq(x = chisq, df = 1)
  df2 = dchisq(x = chisq, df = 2)
  df3 = dchisq(x = chisq, df = 3)
  df6 = dchisq(x = chisq, df = 6)
  </code></pre>
  
  <p>and then I get an error:</p>
  
  <blockquote>
    <p>Error in dchisq(x = chisq, df = 1): Non-numeric argument to
    mathematical function </p>
    
    <p>Traceback:
    1. dchisq(x = chisq, df = 1)</p>
  </blockquote>