Guest User

Untitled

a guest
Jan 24th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. DF$Consistent <- apply(DF, 1, function(x) as.numeric(sum(abs(diff(x))) <= 1))
  2.  
  3. DF <- as.data.frame(rbind(c(0,0,0,1,1), c(1,1,0,0,0), c(1,1,1,1,1), c(0,0,0,0,0), c(1,0,1,0,0), c(0,0,0,1,0)))
Add Comment
Please, Sign In to add comment