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)
}

Try the MazamaSpatialUtils package in your browser

Any scripts or data that you put into this service are public.

MazamaSpatialUtils documentation built on Nov. 3, 2024, 9:07 a.m.