# create the data: two binary relations among three elements
arr <- round( replace( array( runif(18), c(3 ,3, 2) ), array( runif(18),
c(3, 3, 2) ) > .5, 3 ) )
# compute person hierarchy of a random actor from relation box
arr |> rbox(k=1) |>
hierar(ceiling(runif(1, min=0, max=dim(arr)[2])), type="person")
Run the code above in your browser using DataLab