title: Why am I getting NaN for a result which should exist
body: <p>I have the following code for generating random variables in R</p>
  
  <pre class="lang-R prettyprint-override"><code>theta&lt;-1
  
  n&lt;-1000  
  u&lt;-runif(n)
  H&lt;-(-theta*log(1-u)^(1/3))
  </code></pre>
  
  
  
  <p>My problem is that the output I'm getting for H is NaN 1000 times as the output when I know that the answer is real. Is there something wrong with the way I defined H?</p>