## ----setup, include=FALSE----------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) ## ----------------------------------------------------------------------------- library("disordR") (d <- disord(c(4,6,1,2,3,4,5,1))) ind <- which(d>4) ## ----------------------------------------------------------------------------- d d[ind] d[ind] <- 99 d ## ----------------------------------------------------------------------------- ind ## ----------------------------------------------------------------------------- d <- disord(c(4,1,6,2)) dl <- sapply(d,function(x){seq(from=5,to=x)}) dl ## ----------------------------------------------------------------------------- howlong <- unlist(lapply(dl,length)) longest <- which(howlong == max(howlong)) dl[[longest]]