summarize_sdg {SDGdetector} | R Documentation |
Summarize results from SDGdetector at either the Goal level or Target level.
Description
Summarize results from SDGdetector at either the Goal level or Target level.
Usage
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 |
Value
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)
[Package SDGdetector version 2.7.3 Index]