I have the following code for generating random variables in R
theta<-1
n<-1000
u<-runif(n)
H<-(-theta*log(1-u)^(1/3))
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?