inst/shiny_examples/map_app/helpers/bridgeTable.R

# This function creates a table with bridge data

bridgeTable <- function(data, outputData, SFDF, FUN, style, variable) {
  logger.trace("bridgeTable()")
  logger.trace(str(list(FUN = FUN, 
                        style = style)))
  
  names(outputData)[which(names(outputData) == "summaryValue")] <- paste0(FUN, "_", variable)
  if (style == "other"){
    tableDF <- data
  } else if (style == "original_plus_summary"){
    tableDF <- merge(data, outputData)
  } else if (style == "summary_df") {
    tableDF <- outputData
  }
  return(tableDF)
}
MazamaScience/MazamaSpatialUtils documentation built on Sept. 14, 2023, 6 p.m.