timeseries2matrix <- function(img, mask) {
logmask <- (mask == 1)
mat <- img[logmask]
dim(mat) <- c(sum(logmask), dim(img)[length(dim(img))])
return(t(mat))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.