Shows share of articles including reference to a specific terms.Ignores article that don't have a date in the metadata (date=NA).

ShowShare(dataset, terms, breaks = "year", output = "graph",
  startDate = NULL, endDate = NULL, customTitle = NULL,
  export = FALSE, project = NULL, website = NULL)

Arguments

dataset

A dataset created with 'castarter'.

terms

The pattern to be found in the articles.

breaks

Defaults to "year". Parameter is passed to base::cut, and specifies how the dataset should be divided temporally. Available options include "day", "week", "month", "quarter" and "year", but can also be a vector of dates of the POSIXct class.

output

Defaults to "graph". "data.frame" is currently the only alternative option available.

startDate

Character vector with date in the format year-month-date, e.g. "2015-07-14".

endDate

Character vector with date in the format year-month-date, e.g. "2015-07-14".

export

Logical, defaults to FALSE. If TRUE, saves the graph in both png and pdf format. If project and website are provided, in saves the timeseries in the correspondent "Outputs" subfolder.

project

Name of 'castarter' project. Must correspond to the name of a folder in the current working directory.

website

Name of a website included in a 'castarter' project. Must correspond to the name of a sub-folder of the project folder.

Value

A ggplot2 barchart showing shares of articles including reference to a specific terms.

Examples

# NOT RUN {
ShowShare(dataset, breaks = "months")
# }