#' Unique Columns
#'
#' This function finds how many unique values each column has in a dataframe.
#'
#' There are many important details within this function, but the most important is that you enter a data frame as the only argument.
#'
#' @author Isabella Bingaman
#'
#' @param df A data frame.
#'
#' @return The number of unique values in each column of df.
#'
#' @examples
#' unique_columns(mtcars)
#'
#' @export
unique_columns <- function(df){
lengths(lapply(df, unique))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.