Description Usage Arguments Examples
Extract highlighted terms
1 2 3 4 5 6 7 | whe_highlights(wh, flatten = FALSE)
## S3 method for class 'data.frame'
whe_highlights(wh, flatten = FALSE)
## S3 method for class 'character'
whe_highlights(wh, flatten = FALSE)
|
wh |
highlighted object returned by wh_collect, see examples. |
flatten |
whether to flatten ngrams. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library(webhose)
token <- wh_token("xXX-x0X0xX0X-00X")
token %>%
wh_news(q = '"R programming language"') %>% # use highlight!
wh_collect() -> rstats # collect results
rstats %>%
whe_highlights() -> highlights
highlights <- rstats %>%
dplyr::mutate(
nparagraphs = whe_highlights(text)
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.