#' @title na to x in df with all columns
#' @description na to x in df with all columns
#' @param df dataframe
#' @param x the replace value
#'
#' @return dataframe
#'
#' @examples
#'
#' @rdname na_replace_in_df
#' @export
na_replace_in_df <- function(df, x){
df <-
df %>%
dplyr::mutate_all(~ tidyr::replace_na(., x))
return(df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.