AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
39 stars 3 forks source link

`galah_select` always returns 'basic' columns #128

Closed mjwestgate closed 1 year ago

mjwestgate commented 2 years ago

Ideally, galah_select should return only those columns specified by the user, unless they also specify group. In practice, however, columns selected by group = "basic" are always present, e.g.:

reptile_occurrences_1930 <- galah_call() |> 
  galah_identify("reptilia") |> 
  galah_filter(year == 1930) |>
  galah_select(eventDate, kingdom) |>
  atlas_occurrences()

> colnames(reptile_occurrences_1930)
[1] "eventDate"        "kingdom"          "decimalLatitude"  "decimalLongitude" "scientificName"  
[6] "taxonConceptID"   "recordID"         "dataResourceName"

This is almost certainly caused by failing to overwrite the default settings when the user supplies alternate arguments.

mjwestgate commented 2 years ago

Appears fixed now; will close when releasing next version