exoplanets: Retrieve Data from NASAs Exoplanet Archive

Description Usage Arguments Details Value Source See Also Examples

View source: R/exoplanets.R

Description

A simple interface for accessing exoplanet data. At the bare minimum, a table name is required. Tables names are documented in the 'tableinfo' dataset.

Usage

1
exoplanets(table, columns = NULL, limit = NULL, format = "csv")

Arguments

table

A table name, see 'tableinfo'.

columns

A vector of valid column names, by default will return all default columns, see 'tableinfo'.

limit

Number of rows to return. If NULL, returns all data in the table.

format

Desired format, either csv, tsv, or json.

Details

At one time, this package used the Exoplanet Archive Application Programming Interface (API). Since then, a handful of tables have been transitioned to the Table Access Protocol (TAP) service. More tables will be transitioned to TAP and as such, this package only supports queries from TAP. For more information, you can read https://exoplanetarchive.ipac.caltech.edu/docs/exonews_archive.html#29April2021.

Value

A data.frame if format="csv" or format="tsv". A list if format="json".

Source

https://exoplanetarchive.ipac.caltech.edu/

See Also

tableinfo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if (interactive()) {
  # request all default columns from the `ps` table
  exoplanets("ps")

  # request the planet name and discovery method from the `ps` table
  exoplanets("ps", c("pl_name", "discoverymethod"))

  # request the first 5 rows from the `keplernames` table
  exoplanets("keplernames", limit = 5)

  # request in json format (returns list)
  exoplanets("ps", c("pl_name", "discoverymethod"), format = "json")

}

exoplanets documentation built on July 24, 2021, 5:07 p.m.