From @nto|ne@|@br| @end|ng |rom gm@||@com  Fri Nov 13 15:15:37 2020
From: @nto|ne@|@br| @end|ng |rom gm@||@com (Antoine Fabri)
Date: Fri, 13 Nov 2020 15:15:37 +0100
Subject: [Rd] exists, get and get0 accept silently inputs of length > 1
Message-ID: <CAEKh8uhYFh5J_m1UjU1jqqR=fsA-MeS+OYDHTbAJGRYk9mmdiA@mail.gmail.com>

Dear R-devel,

The doc of exists, get and get0 is unambiguous, x should be an object given
as a character string. However these accept longer inputs. It can lead an
uncareful user to think these functions are vectorized when they're not,
and generally lets through bugs that one might have preferred to trigger
earlier failure.

``` r
exists("d")
#> [1] FALSE
exists(c("c", "d"))
#> [1] TRUE
get(c("c", "d"))
#> function (...)  .Primitive("c")
get0(c("c", "d"))
#> function (...)  .Primitive("c")
```

I believe these should either fail, or be vectorized, probably the former.

Thanks,

Antoine

	[[alternative HTML version deleted]]



[Rd] exists, get and get0 accept silently inputs of length > 1
Antoine Fabri