title: How to dichotomize a data set in R
body: <p>I am brand new to R, and am attempting to dichotomize the third dimension (10x10) of the following data set:</p>
  
  <p><a href="http://www.stat.washington.edu/~hoff/courses/567/Data/monks" rel="nofollow noreferrer">http://www.stat.washington.edu/~hoff/courses/567/Data/monks</a></p>
  
  <p>It looks like I should be able to run two loops for the rows and columns like this, but isn't working:</p>
  
  <pre><code>for (k in 1:10)
  { replace(k,1, k&gt;1=1) }
  </code></pre>
  
  <p>This is my second day trying to figure out <em>R</em>, with no background except for a little <em>STATA</em> experience. Any suggestions are appreciated.</p>