#' Read in Hayes data from SPSS or R output
#'
#' @description Wrapper for the `read_hayes_plot_data_spss` and
#' `read_hayes_plot_data_R` functions that automatically detects
#' the correct function to call. Both functions are currently only supporting
#' models 1 - 3 (i.e. no mediation) as I did not have the time to work on those yet.
#'
#' @param hayes_data The data object from which to extract the information. Can be
#' a path to a .txt file (exported from SPSS via copy/paste) or an R object, generated by process
#' for R and saved to a variable using
#'
#' @returns A list of class HayesData consisting of the plot_data for visualizing the interaction as well as the various significance
#' measures from the Hayes SPSS output as well as the model description.
#'
#' @export
read_hayes_plot_data <- function(hayes_data){
if (class(hayes_data) == data.frame) read_hayes_plot_data_R(hayes_data)
else if (class(hayes_data) == "character") read_hayes_plot_data_spss(hayes_data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.