Skip to content

Commit

Permalink
gators_merge added (poorly)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaynor1 committed Sep 1, 2023
1 parent 13a0448 commit 300eae7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions R/gators_merge.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#' @title Merge Retained Data - Combined original dataset with georeferenced or retained records.
#'
#' @description
#' The `gators_merge()` function combines two data sets with identical columns and returns a single dataset.
#' @details
#' This function requires no additional packages.
#'
#' @param df2 A data frame downloaded with `gators_download()`.
#' @param df2 A data frame with the same columns as df1, but with observations generated through georeferencing or through data requests.
#'
#' @examples
#' cleaned_data <- gators_merge(df1, df2)
#'
#' @return A combined dataset.
#'
#' @export

gators_merge <- function(df1, df2){
if(colnames(df1) == colnames(df2)){
combined <- rbind(df1, df2)
return(combined)
} else{
return(df1)
}
}

0 comments on commit 300eae7

Please sign in to comment.