Fetch Exoplanets table
Arguments
- table
A string specifying the table to query. Must be one of:
ps
- Planetary Systems tablepscomppars
– Planetary Systems Composite Parameters tablestellarhosts
– Stellar Hosts tablekeplernames
– Kepler Confirmed Names
- query_string
Optional ADQL
WHERE
clause as a string, e.g.,pl_bmasse > 1 AND st_teff < 6000
.- pretty_colnames
Optional
bool
value. IfTRUE
replaces database column names with their labels / descriptions. Defaults toFALSE
. Currently only tablesps
andpscomppars
are supported.- format
Optional
char
value specifying output format. Can be either"csv"
for data frame, or"json"
for a named list.
Details
Fetches data from an exoplanets TAP (Table Access Protocol) service
and returns it as a data frame or a named list.
You can optionally specify WHERE
ADQL clause to filter rows based on conditions.
Examples
if (FALSE) { # \dontrun{
# All entries from Stellar Hosts table
fetch_table("stellarhosts")
# Entries from Planetary Systems table where planetary mass > 3 times the earth mass
fetch_table("ps", query_string = "pl_bmasse > 3")
# Planets orbiting Teegarden's Star with radius > 1 Earth radius
fetch_table("pscomppars", query_string = "hostname = 'Teegarden''s Star' and pl_rade > 1")
} # }