Skip to contents

search

Usage

pplr_search(proj_metadata_key, limit = 10, offset = 0, ...)

Arguments

proj_metadata_key

project metadata key

limit

number of records to return, default: 10

offset

record number to start at, default: first record

...

curl options passed on to [crul::HttpClient]

Examples

# basic example
pplr_search(proj_metadata_key = 13)
#> $count
#> [1] 24543
#> 
#> $returned
#> [1] 10
#> 
#> $data
#> # A tibble: 10 × 30
#>    count_table_key year   month day   spatial_replication_level_1
#>    <lgl>           <chr>  <chr> <chr> <chr>                      
#>  1 NA              1992.0 10.0  8.0   BC_I                       
#>  2 NA              1998.0 9.0   17.0  BC_I                       
#>  3 NA              1998.0 9.0   17.0  BC_I                       
#>  4 NA              1993.0 10.0  26.0  BC_I                       
#>  5 NA              1989.0 8.0   22.0  BC_I                       
#>  6 NA              1992.0 10.0  13.0  BC_I                       
#>  7 NA              1990.0 11.0  16.0  BC_I                       
#>  8 NA              2002.0 10.0  18.0  BC_I                       
#>  9 NA              1982.0 11.0  18.0  BC_I                       
#> 10 NA              2005.0 10.0  21.0  BC_I                       
#> # ℹ 25 more variables: spatial_replication_level_2 <chr>,
#> #   spatial_replication_level_3 <chr>, spatial_replication_level_4 <lgl>,
#> #   spatial_replication_level_5 <lgl>, treatment_type_1 <lgl>,
#> #   treatment_type_2 <lgl>, treatment_type_3 <lgl>, structure_type_1 <chr>,
#> #   structure_type_2 <chr>, structure_type_3 <chr>, count_observation <chr>,
#> #   covariates <chr>, structure_type_4 <chr>, authors <chr>,
#> #   authors_contact <chr>, sppcode <chr>, genus <chr>, species <chr>, …
#> 
#> $error
#> NULL
#> 
# pass in curl options for debugging, seeing http request details
pplr_search(proj_metadata_key = 13, verbose = TRUE)
#> $count
#> [1] 24543
#> 
#> $returned
#> [1] 10
#> 
#> $data
#> # A tibble: 10 × 30
#>    count_table_key year   month day   spatial_replication_level_1
#>    <lgl>           <chr>  <chr> <chr> <chr>                      
#>  1 NA              1992.0 10.0  8.0   BC_I                       
#>  2 NA              1998.0 9.0   17.0  BC_I                       
#>  3 NA              1998.0 9.0   17.0  BC_I                       
#>  4 NA              1993.0 10.0  26.0  BC_I                       
#>  5 NA              1989.0 8.0   22.0  BC_I                       
#>  6 NA              1992.0 10.0  13.0  BC_I                       
#>  7 NA              1990.0 11.0  16.0  BC_I                       
#>  8 NA              2002.0 10.0  18.0  BC_I                       
#>  9 NA              1982.0 11.0  18.0  BC_I                       
#> 10 NA              2005.0 10.0  21.0  BC_I                       
#> # ℹ 25 more variables: spatial_replication_level_2 <chr>,
#> #   spatial_replication_level_3 <chr>, spatial_replication_level_4 <lgl>,
#> #   spatial_replication_level_5 <lgl>, treatment_type_1 <lgl>,
#> #   treatment_type_2 <lgl>, treatment_type_3 <lgl>, structure_type_1 <chr>,
#> #   structure_type_2 <chr>, structure_type_3 <chr>, count_observation <chr>,
#> #   covariates <chr>, structure_type_4 <chr>, authors <chr>,
#> #   authors_contact <chr>, sppcode <chr>, genus <chr>, species <chr>, …
#> 
#> $error
#> NULL
#>