getCategoryElements: Get all elements of a given category

Description Usage Arguments Details Value See Also Examples

View source: R/getCategoryElements.R

Description

A function to get all page names of SNPedia tagged under the indicated category.

Usage

1
2
getCategoryElements(category, verbose = FALSE, includeTemplates = FALSE,
  limit, baseURL, format, query, continue)

Arguments

category

The category to be used. Just one at a time.

verbose

If TRUE some messages are provided.

includeTemplates

If TRUE page templates are kept in the output.

limit

The maximum number of items to be queried at a time.

baseURL

SNPedia boots URL.

format

Downloading format. Currently just JSON is available.

query

The query to be iterated.

continue

To be used in multi-page queries.

Details

A list of all available categories may be found at:

http://www.snpedia.com/index.php/Special:Categories

Most used categories are:

Some template pages are included in their corresponding category. By default those will be removed. Set includeTemplates to TRUE is you want to keep them.

Parameters other than category and verbose are not intended for standard users.

Value

A character vector containing the names of the pages under the required category.

See Also

getPages, extractTags

Examples

1
2
3
4
5
6
7
res <- getCategoryElements(category = "Is_a_medical_condition")
head(res)

## Not run: 
res <- getCategoryElements(category = "Is_a_snp")

## End(Not run)

SNPediaR documentation built on Nov. 8, 2020, 5:08 p.m.