Learn R Programming

quincunx (version 0.1.9)

subset-publications: Subset a publications object

Description

You can subset publications by identifier or by position using the `[` operator.

Usage

# S4 method for publications,missing,missing,missing
[(x, i, j, ..., drop = FALSE)

# S4 method for publications,numeric,missing,missing [(x, i, j, ..., drop = FALSE)

# S4 method for publications,character,missing,missing [(x, i, j, ..., drop = FALSE)

Value

A publications object.

Arguments

x

A publications object.

i

Position of the identifier or the name of the identifier itself.

j

Not used.

...

Additional arguments not used here.

drop

Not used.

Examples

Run this code
if (FALSE) { # interactive()
# Get all publications in the PGS Catalog:
all_pub <- get_publications(interactive = FALSE, progress_bar = FALSE)

#
# Subsetting by position
#
all_pub[1:5]

#
# Subsetting by publication identifier (character)
#
all_pub['PGP000001']
}

Run the code above in your browser using DataLab