-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} |