Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
popovs opened this issue May 15, 2024 · 0 comments
Open

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

popovs opened this issue May 15, 2024 · 0 comments

Comments

@popovs
Copy link

popovs commented May 15, 2024

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.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant