View source: R/summarize_sdg.R
summarize_sdg | R Documentation |
Summarize results from SDGdetector at either the Goal level or Target level.
summarize_sdg(data, sum_by = "target", quiet = FALSE)
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 |
Data frame with at least one column named "SDG" or "Target", and one column Freq
that
represent the total hits.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.