quote_tags {statquotes} | R Documentation |
List the tags of the quotes database
Description
This function finds the unique tags of items in the quotes database and returns them as vector or a one-way table giving their frequencies.
Usage
quote_tags(table = FALSE)
Arguments
table |
Logical. If |
Value
Returns either a vector of tags in the quotes database or a one-way frequency table of the number of quotes for each tag.
Examples
quote_tags()
quote_tags(table=TRUE)
library(ggplot2)
qt <- quote_tags(table=TRUE)
qtdf <-as.data.frame(qt)
# bar plot of frequencies
ggplot2::ggplot(data=qtdf, aes(x=Freq, y=tags)) +
geom_bar(stat = "identity")
# Sort tags by frequency
qtdf |>
dplyr::mutate(tags = forcats::fct_reorder(tags, Freq)) |>
ggplot2::ggplot(aes(x=Freq, y=tags)) +
geom_bar(stat = "identity")
[Package statquotes version 0.3.2 Index]