title: how to write text inside a rectangle in R
body: <p>I want each rectangle to contain a number, so that the first plotted rectangle would contain : rect 1 the second rect 2 and so on, but i don't know how to insert text inside rectangles. </p>
  
  <pre><code>require(grDevices)
  ## set up the plot region:
  
  plot(c(0, 250), c(0, 250), type = "n",
       main = "Exercise 1: R-Tree Index Question C")
  
  rect(0.0,0.0,40.0,35.0, , text= "transparent")
  rect(10.0,210.0,45.0,230.0)
  rect(170.0,50.0,240.0,150.0)
  rect(75.0,110.0,125.0,125.0)
  rect(50.0,130.0,65.0,160.0)
  rect(15.0,140.0,30.0,150.0)
  rect(100.0,50.0,130.0,90.0)
  rect(150.0,40.0,155.0,60.0)
  rect(52.0,80.0,75.0,90.0)
  rect(62.0,65.0,85.0,75.0)
  rect(20.0,75.0,25.0,80.0)
  rect(30.0,40.0,50.0,80.0)
  rect(102.0,155.0,113.0,217.0)
  
  
  
  par(op)
  </code></pre>