list fields

list_fields(fields = NULL, server = NULL, implemented_only = TRUE)

Arguments

fields

field (column name) to search for

server

base URL to the FishBase API (by default). For SeaLifeBase, use https://fishbase.ropensci.org/sealifebase

implemented_only

by default, only return those tables that have been implemented.

Value

a data frame listing the table names (matching function names in rfishbase) and the matching column names those tables have implemented.

Details

Calling `list_fields()` with no arguments will return the full table of all known fields. Then users can employ standard filter techniques like grep for partial name matching; see examples.

Examples

# \donttest{ list_fields("Temp")
#> # A tibble: 2 x 1 #> table #> <chr> #> 1 occurrence #> 2 oxygen
## Regex matching on full table library(dplyr)
#> #> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’: #> #> filter, lag
#> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union
list_fields() %>% filter(grepl("length", columns, ignore.case = TRUE))
#> # A tibble: 107 x 2 #> table columns #> <chr> <chr> #> 1 diet FishLength #> 2 fecundity LengthFecunMin #> 3 fecundity LengthTypeFecMin #> 4 fecundity LengthFecunMax #> 5 fecundity LengthTypeFecMax #> 6 fecundity LengthFecunMean #> 7 fecundity LengthTypeFecMean #> 8 fecundity LengthMin #> 9 fecundity LengthMax #> 10 fecundity LengthType #> # … with 97 more rows
# }