Description Usage Arguments Details Value Author(s) See Also Examples
lists all pages that link to a specific Wikipedia page.
1 |
page |
numeric identifier or character title of the specific wikipedia page |
domain |
a character value specifying the language of the wikipedia page.The default value is "en" for "english language". |
This function uses API query syntax: "list=backlinks". For more details, see https://www.mediawiki.org/wiki/API:Backlinks
an object of class backLinksClass
containing:
call
the command line
page
title, identification number and domain of the Wikipedia page, created only if the page exists.
backLinks
a data frame containing
title
, the titles of the pages that link to the specific page,
pageid
, the pages IDs,
ns
, numbers of the namespaces (identification of the type of pages, defining nscat et nssubj, the two next variables),
nscat
, the categories of linked pages (Subject, Talk, or Virtual),
nssubj
, the subjects of the linked pages (Main Article, User, Wikipedia, File, MediaWiki, Template, Help, Category, Protal, Book, Draft, Education Program, TimedText, Module, Topic, Special, Media, Other).
For more details about namespace, see http://en.wikipedia.org/wiki/Wikipedia:Namespace#Subject_namespaces
If the page has no back link or does not exist, this item is not created.
testWikiPage
a list of four elements,
takeOnlyFirst
a boolean indicating if the class of page
parameter is invalid,
for example vector, list, matrix..., and in that case, only the first element is considered.
redirPage
title of the redirected page. This item is NULL if the page is not redirected.
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.
warnMessage
is a vector of warning messages.
Avner Bar-Hen, Louise Baschet, Francois-Xavier Jollois, Jeremie Riou
print.backLinksClass links
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
#' # a simple example
backLinks("Louis Pasteur")
backLinks.Baschet <- backLinks(page ="Cristal Baschet", domain ="fr")
table(backLinks.Baschet$backLinks$nscat)
## example with no back link
backLinks(page = 976, domain = "en" )
# with a page that not exist (at the moment of the redaction of this help page)
backLinks("zzzzz")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.