Generates links to index pages listing individual articles.

CreateLinks(linkFirstChunk, linkSecondChunk = NULL, startPage = 1,
  endPage = 10, increaseBy = 1, dateFormat = NULL,
  startDate = NULL, endDate = NULL, dateSeparator = "-",
  reversedOrder = FALSE, export = FALSE, importParameters = NULL,
  exportParameters = TRUE, project = NULL, website = NULL)

Arguments

linkFirstChunk

First part of index link that does not change in other index pages.

linkSecondChunk

Part of index link appneded after the part of the link that varies. If not relevant, may be left empty.

startPage

If the links include a numerical component, define first number of the sequence. startPage defaults to 1.

endPage

If the links include a numerical component, define first number of the sequence. endPage defaults to 10.

increaseBy

Defines by how much the number in the link should be increased in the numerical sequence. Defaults to 1.

dateFormat

A charachter string that defines the format of the date to incldue in the link. Available options are: "Y" (e.g. 2015), "Ym" (2015-10), "Ymd" (e.g. 2015-10-24).

export

Exports the links generated by the function in a .txt file in the folder project/website.

importParameters

Defaults to NULL. If TRUE, ignores all parameters given in the function call, and imports them from parameters file stored in "project/website/Logs/parameters.rds".

exportParameters

Defaults to TRUE. If TRUE, function parameters are exported in the project/website folder. They can be used to update the corpus. Requires parameters project/website.

project

Name of 'castarter' project. Must correspond to the name of a folder in the current working directory. Not required if previously set with SetCastarter(project = "project", website = "website")

website

Name of a website included in a 'castarter' project. Must correspond to the name of a sub-folder of the project folder. Not required if previously set with SetCastarter(project = "project", website = "website")

Value

A character vector of links to index pages.

Examples

# NOT RUN {
indexLinks <- CreateLinks("http://www.example.com/news/")
# }