summarize_sdg function

Summarize results from SDGdetector at either the Goal level or Target level.

Summarize results from SDGdetector at either the Goal level or Target level.

summarize_sdg(data, sum_by = "target", quiet = FALSE)

Arguments

  • data: Data frame or a string
  • sum_by: The group level to be chosen for data summary. Default parameter is "target", and can also set at "goal" level.
  • quiet: Logical. Suppress info message

Returns

Data frame with at least one column named "SDG" or "Target", and one column Freq that represent the total hits.

Examples

library(SDGdetector) df <- data.frame(col = c( 'our goal is to end poverty globally', 'this product contributes to slowing down climate change')) data <- SDGdetector(x = df, col = col) summarize_sdg(data, sum_by = 'target', quiet = FALSE)