Nothing
#' accepts a psmatrix
#' converts 1/0 purchase strings to recency at timeof
#' @export psmatrix_to_recency_attimeof_matrix
#' @param psmatrix a psmatrix
psmatrix_to_recency_attimeof_matrix <- function(psmatrix) {
rec_ato_matrix <- matrix(nrow = nrow(psmatrix), ncol = ncol(psmatrix))
for (i in 1:nrow(psmatrix)) {
for (j in 1:ncol(psmatrix)) {
#rec_ato_matrix[i,j] <- CADF::recency_from_rle(rle(psmatrix[i, i:j]))
rec_ato_matrix[i,j] <- 1 #needs fixed
}
}
return(rec_ato_matrix)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.