Skip to contents

The R-side twin of the SQL cast. An id reaches a published object by several routes — a SELECT this package writes, a SELECT * of a precomputed table, a column already read into R — and only the first was covered, so v7's zone_taxon.parquet still carried taxon_id as a DOUBLE and published "22725044.0" while taxon.parquet beside it said "22725044". One contract, two spellings, and every join between them empty.

Usage

app_id_chr(x, what = "id")

Arguments

x

an id vector (numeric, integer, integer64 or character)

what

name used in the error message

Value

a character vector

Details

Whole numbers become digits only; NA stays NA; a trailing .0 on a string is stripped (it means whole); anything genuinely fractional is an error, never a rounded neighbour — see app_taxon_table().

Examples

app_id_chr(c(137162, NA))          # "137162" NA
#> [1] "137162" NA      
app_id_chr(c("22725044.0", "7"))   # "22725044" "7"
#> [1] "22725044" "7"