title: How to make 3D histogram in R
body: <p>This is my goal: Plot the frequency of <code>y</code> according to <code>x</code> in the <code>z</code> axis.</p>
  
  <p>These are my problems: I have a two columns array (<code>x</code> and <code>y</code>) and need to divide <code>x</code> into classes (p.ex. 0.2 ou 0.5) and calculate the frequency of <code>y</code> for each class of <code>x</code>. The plot should appear like a <code>x-y</code> plot in the "ground" plan and the frequency in the <code>z</code> axis. It could be like a surface or a 3D histogram. I tried to make it using the <code>hist3D</code> function of <code>plot3D</code> package but I don't know what I am doing wrong.</p>
  
  <p>This is an example of what I am trying to do:</p>
  
  <p><a href="https://www.safaribooksonline.com/library/view/r-data-visualization/9781783989508/ch06s05.html" rel="noreferrer">https://www.safaribooksonline.com/library/view/r-data-visualization/9781783989508/ch06s05.html</a></p>
  
  <p>Thanks!!</p>