powered by
locate_ndl_in_hay()
Convert array index into xy location in matrix. Helper function for locate_ndl_in_hay().
index2xy(index, nrow)
A numeric pair of xy location.
A numeric.
nrow <- 4 matrix(1:12, nrow = nrow) purrr::map(1:12, index2xy, nrow = nrow)
Run the code above in your browser using DataLab