Learn R Programming

IssueTrackeR (version 1.5.0)

extract_nth: Extract the nth Issue from an List of Issues

Description

Extract the nth issue from a IssuesTB object.

Usage

extract_nth(x, ...)

# S3 method for IssuesTB extract_nth(x, n, verbose = TRUE, ...)

# S3 method for default extract_nth(...)

Value

The nth issue as a IssueTB object. If n exceeds the number of issues, returns the last issue with a warning. Returns NULL if the issues list is empty.

Arguments

x

An object of class IssuesTB.

...

Currently not used.

n

Integer. Position of the element to extract. 1 is for the first element.

verbose

A logical value indicating whether to print additional information. Default is TRUE.

Examples

Run this code
all_issues <- get_issues(
    source = "local",
    dataset_dir = system.file("data_issues", package = "IssueTrackeR"),
    dataset_name = "open_issues.yaml"
)

first_issue <- extract_nth(all_issues, 1)
third_issue <- extract_nth(all_issues, 3)

Run the code above in your browser using DataLab