You're logic is a bit problematic, especially how you're using rows. Let's say you want to do it for column 1 of the data.frame dat
.
n <- nrow(dat)
y <- dat[1:(n-1),1] < dat[2:n,1]
y <- c(FALSE, y) # we know the first one is false because there's nothing before