Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

testWikiPage

internal function testWikiPage


Description

internal function to test validity of a wikidepia page, called in links, backLinks, and contribs functions.

Usage

testWikiPage(page = NULL, domain = "en")

Arguments

page

numeric identifier or character title of the specific wikipedia page

domain

a character value providing the language of the wikipedia page.The default value is "en" for "english language".

Value

a list of four elements, the first is takeOnlyFirst, a boolean indicating if the class of page parameter is invalid, for example vector, list, matrix..., and in that case, the only the first element is considered. The second element is redirPage, the title page of the redirected page. The third element is test, an integer with value:

  • 4 for invalid domain,

  • 3 for an empty parameter page,

  • 2 when Wikipedia does not have an article with this exact name,

  • 1 for ambiguous page, direct or redirect,

  • 0 for valid an unambiguous page, direct or redirect.

The last element, warnMessage, is a vector of warning messages.

Author(s)

Avner Bar-Hen, Louise Baschet, Francois-Xavier Jollois, Jeremie Riou


WikipediaR

R-Based Wikipedia Client

v1.1
GPL (> 2)
Authors
Avner Bar-Hen [aut, cre], Louise Baschet [ctb], Francois-Xavier Jollois [ctb], Jeremie Riou [ctb]
Initial release
2016-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.