title: Change resolution of a PDF containing a plot with many datapoints in R
body: <p>I have a large dataset, which I want to plot. Unfortunately the PDF-file becomes very large, and the PDF readers need long time to show the plot (which can be annoying, when you want to scroll).</p>
  
  <pre><code>l = 1e6
  x = 1:l
  y = x * 2 + runif(l)
  
  pdf("points.pdf")
  plot(x, y)
  dev.off()
  
  pdf("lines.pdf")
  plot(x, y, type="l")
  dev.off()
  </code></pre>
  
  <p>If I use lines instead of points, there is less problems. This made me think, that there might be a compression or lowered resolution used when creating PDF files.  Also when I add the plot to a LaTeX file, LaTeX seems to lower the resolution.</p>
  
  <p><strong>I there a parameter I can use to lower the resolution?</strong>.</p>