pkg_search: Search CRAN packages

Description Usage Arguments Details Value Examples

View source: R/api.R

Description

pkg_search() starts a new search query, or shows the details of the previous query, if called without arguments.

ps() is an alias to pkg_search().

more() retrieves that next page of results for the previous query.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
pkg_search(query = NULL, format = c("short", "long"), from = 1, size = 10)

ps(query = NULL, format = c("short", "long"), from = 1, size = 10)

more(format = NULL, size = NULL)

## S3 method for class 'pkg_search_result'
summary(object, ...)

## S3 method for class 'pkg_search_result'
print(x, ...)

Arguments

query

Search query string. If this argument is missing or NULL, then the results of the last query are printed, in short and long formats, in turns for successive pkg_search() calls. If this argument is missing, then all other arguments are ignored.

format

Default formatting of the results. short only outputs the name and title of the packages, long also prints the author, last version, full description and URLs. Note that this only affects the default printing, and you can still inspect the full results, even if you specify short here.

from

Where to start listing the results, for pagination.

size

The number of results to list.

object

Object to summarize.

...

Additional arguments, ignored currently.

x

Object to print.

Details

Note that the search needs a working Internet connection.

Value

A tibble with columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Example
ps("survival")

# Pagination
ps("networks")
more()

# Details
ps("visualization")
ps()

# See the underlying tibble
ps("ropensci")
ps()[]

pkgsearch documentation built on Oct. 23, 2020, 7:12 p.m.