R/snhu-join-data.R

#' Join SNHU and Soomo data
#'
#' Allows users to combine SNHU and Soomo data
#'
#' A wrapper to dplyr::left_join that allows data from SNHU and Soomo to be joined once the soomo_id
#' is added to the SNHU data
#'
#' @param soomo_data An object. The name of the dataframe including Soomo data.
#'  This does not need to be included if the name of this dataframe is `soomo_data`.
#' @param snhu_data An object. The name of the dataframe including SNHU data
#'  This does not need to be included if the name of this dataframe is `snhu_data`.
#' @import dplyr
#' @export

snhu_join_data <- function(soomo_data, snhu_data){
  requireNamespace("dplyr")
  left_join(snhu_data, soomo_data, by = "soomo_id") %>%
    distinct()
}
plduffy/rsoomo documentation built on May 26, 2019, 12:32 a.m.