Dear all,
I was playing around with factor contrasts, and found the argument nmax on function factor. When using nmax=1, R froze completely, and I had to close it from task manager. After some debugging, I found that the problem is actually in unique-function, where the internal unique function is called:
.Internal(unique(x, incomparables, fromLast, nmax))
More generally, it looks like unique(x,nmax=k) freezes R the length of x is larger than 2 and k=1, and when nmax