## Generate some data
n <- 1000 # sample size
d <- 20 # dimension
set.seed(271) # set seed (for reproducibility)
x <- matrix(rnorm(n * d), ncol = d) # i.i.d. N(0,1) data
## Extract the occupancy matrix from a zenplot
res <- zenplot(x)
(occ <- res[["path"]][["occupancy"]])
## Convert the occupancy matrix
convert_occupancy(occ)
Run the code above in your browser using DataLab