Nothing
#' table2dataframe
#'
#' Converts a table to a full data frame.
#'
#' @param tab table: contingency table
#' @param ... further parameters given to [base::as.data.frame.table()]
#'
#' @md
#' @return a data frame with `sum(tab)` rows and `length(dim(tab))` cols
#' @export
#'
#' @examples
#' table2dataframe(Titanic)
table2dataframe <- function(tab, ...) {
stopifnot("table" %in% class(tab))
df <- as.data.frame(tab, ...)
index <- rep(1:nrow(df), df$Freq)
df[index,-ncol(df)]
}
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.