#' Name Models
#'
#' @param data A data frame containing fitted models.
#' @param data_name Name of the dataset.
#' @param predictor_name Name of the predictor data.
#' @param sampling_name Name of the sampling method.
#' @param resampling_name Name of the resampling method.
#' @param model_name Name of the modeling method.
#'
#' @return A data frame with added name columns.
#' @export
name_models <- function(data, data_name=NULL, predictor_name=NULL, sampling_name=NULL, resampling_name=NULL, model_name=NULL) {
if(!is.null(data_name)) {
data <- dplyr::mutate(data, data_name = data_name)
}
if(!is.null(predictor_name)) {
data <- dplyr::mutate(data, predictor_name = predictor_name)
}
if(!is.null(sampling_name)) {
data <- dplyr::mutate(data, sampling_name = sampling_name)
}
if(!is.null(resampling_name)) {
data <- dplyr::mutate(data, resampling_name = resampling_name)
}
if(!is.null(model_name)) {
data <- dplyr::mutate(data, model_name = model_name)
}
return(data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.