# Rgbif unknown or uninitialized column warning

**URL:** <https://discourse.gbif.org/t/rgbif-unknown-or-uninitialized-column-warning/4201>\
**Category:** Data Use\
**Created:** [November 14, 2023, 3:55pm UTC](https://discourse.gbif.org/t/rgbif-unknown-or-uninitialized-column-warning/4201 "2023-11-14T15:55:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakeamahr](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@jakeamahr](https://discourse.gbif.org/u/jakeamahr)\
**Post date:** [November 14, 2023, 3:55pm UTC](https://discourse.gbif.org/t/rgbif-unknown-or-uninitialized-column-warning/4201/1 "2023-11-14T15:55:33Z")

</div>

Hello! I have a small question regarding rgbif keys and a warning I am receiving when searching for a taxon/genus key:

_Warning message:_  
_Unknown or uninitialised column: `genusKey`._

I have already found a solution, but don’t understand the reasoning.

I am looking up the keys for different genera and initially all was fine:

```auto
> name_backbone("Acer")$genusKey
[1] 3189834
> name_backbone("Picea")$genusKey
[1] 7606064

```

However, doing the same for “Pinus” results in the warning:

```auto
> name_backbone("Pinus")$genusKey
NULL
Warning message:
Unknown or uninitialised column: `genusKey`. 

```

I also receive the warning when using taxonKey and usageKey.

However, it seems to work if I use “Pinus L.”:

```auto
> name_backbone("Pinus L.")$genusKey
[1] 2684241

```

So I guess my question is why would this be the case for only Pinus among these three genera?

Thanks!

---

<div class="post-metadata">

**Author:** ![kwebbink](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@kwebbink](https://discourse.gbif.org/u/kwebbink)\
**Post date:** [November 14, 2023, 9:46pm UTC](https://discourse.gbif.org/t/rgbif-unknown-or-uninitialized-column-warning/4201/2 "2023-11-14T21:46:09Z")

</div>

Hi – It looks like `name_backbone("Pinus")` doesn’t actually return a matching taxon – here’s what does come back:

```auto
> test_pinus <- name_backbone("Pinus")
> test_pinus
# A tibble: 1 × 4
# confidence matchType synonym verbatim_name
# * <int> <chr> <lgl> <chr>        
# 1 100 NONE FALSE Pinus

```

The dataframe that’s returned doesn’t include a `genusKey` column, so you get the “_Unknown_…” error when trying to view that non-existent column. You do get a maybe-helpful `matchType` column – e.g., before trying to pull a `genusKey`, you might want to check `matchType`’s value:

```auto
test_pinus <- name_backbone("Pinus")
if (test_pinus$matchType != "NONE") {...}

```

That said, I’m not sure why “Pinus” wouldn’t return a similar result to your “Acer” search, but if you need to avoid that ‘no match’ situation in your script (where the author isn’t known or isn’t part of the input), checking the returned dataframe’s `matchType`, &/or specifying `rank` or `genus` options along with `name` might help – e.g.:

`name_backbone(name = "Pinus", genus = "Pinus")`

Also not sure exactly why that works & other setup’s don’t, but maybe more info at “[Lookup names in the GBIF backbone taxonomy. — name\_backbone • rgbif](https://docs.ropensci.org/rgbif/reference/name_backbone.html)” & all ears if other suggestions come up

---

<div class="post-metadata">

**Author:** ![jwaller](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jwaller](https://discourse.gbif.org/u/jwaller)\
**Post date:** [November 15, 2023, 9:01am UTC](https://discourse.gbif.org/t/rgbif-unknown-or-uninitialized-column-warning/4201/3 "2023-11-15T09:01:56Z")

</div>

@jakeamahr

Have a look at this article: (relevant section pasted below)

> **[Working With Taxonomic Names](https://docs.ropensci.org/rgbif/articles/taxonomic_names.html)**

## Too many choices problem

When two or more names exist in the [GBIF Backbone Taxonomy](https://www.gbif.org/dataset/d7dddbf4-2cf0-4f39-9b2a-bb099caae36c) that have the **same name** but **different authorship** (homotypic synonyms), supplying just the binomial name will result in `matchType : "HIGHERRANK"`.

For example, the binomial name “Glocianus punctiger” has two entries in the backbone taxonomy. Using the `verbose=TRUE` will return both names.

```auto
name_backbone("Glocianus punctiger",verbose=TRUE) # returns more names
# "Glocianus punctiger (C.R.Sahlberg, 1835)"
# "Glocianus punctiger (Gyllenhal, 1837)"

```

However, giving just the binomial name will return the genus **Glocianus** , since GBIF doesn’t know which one to choose.

```auto
name_backbone("Glocianus punctiger") # matchType : "HIGHERRANK"

```

Since `name_backbone` is designed to give back the best match, it’s not possible for the response to choose between the two names.

---

<div class="post-metadata">

**Author:** ![jakeamahr](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@jakeamahr](https://discourse.gbif.org/u/jakeamahr)\
**Post date:** [November 16, 2023, 2:44am UTC](https://discourse.gbif.org/t/rgbif-unknown-or-uninitialized-column-warning/4201/4 "2023-11-16T02:44:39Z")

</div>

Thanks @jwaller ! Seems there is a mollusk in a now-defunct Pinus genus I was very unaware of. In the end I just downloaded a larger subset of the data for the location I was interested (it was very small) and then filtered within R by genus, but was curious what was happening on the gbif side of things with the name\_backbones.
