Skip to content

occurrence 'fields' param not returning fields as expected #108

Description

@popovs

Hello, I am trying to extract some data with the occurrence function, but it is not returning the expected fields.

E.g. -

tmp <- robis::occurrence(scientificname = "Raja miraletus",
                         fields = c("scientificName",
                                    "basisOfRecord",
                                    "decimalLatitude",
                                    "decimalLongitude",
                                    "bathymetry",
                                    "shoredistance",
                                    "sst",
                                    "sss")
                         )

will only return 5 fields:

> names(tmp)
[1] "basisOfRecord"    "decimalLatitude"  "decimalLongitude" "scientificName"   "id" 

Limiting the fields to just 'sst' or 'sss' returns only the id column:

tmp <- robis::occurrence(scientificname = "Raja miraletus",
                         fields = c("sst",
                                    "sss")
                         )

> names(tmp)
[1] "id" 

However, if I run the occurrence function with nothing specified in the 'fields' param, I get all 136 columns, including my other columns of interest (bathymetetry, sst, etc.).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions