#' Function to save merged data for station/storm event, saved as file, eg 434425090462401data.txt
#'
#' This function accepts a siteNo, StartDt and EndDt and merged data data frame for a storm event, and generates a data file
#'
#' @param siteNo USGS station id
#' @param StartDt start of storm event
#' @param EndDt end of storm event
#' @param adaps_data_all data frame of event data
#' @export
mergedDataTable <- function(siteNo,StartDt,EndDt,adaps_data_all) {
tableOut <- adaps_data_all[,c("agency_cd","site_no","datetime","p00065","p00060","p99234")]
fileName <- paste(siteNo,"data.csv",sep="")
sink(fileName)
cat("Station:"," ",siteNo,"\t","Start date:"," ",strftime(StartDt),"\t","End date:"," ",strftime(EndDt),"\n\n")
write.table(tableOut,file="",sep=",",row.names=FALSE)
sink()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.