Bug 15979 - WISH: Support for options(list())
Summary: WISH: Support for options(list())
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Wishlist (show other bugs)
Version: R-devel (trunk)
Hardware: All All
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2014-09-15 18:27 UTC by Henrik Bengtsson
Modified: 2015-12-14 13:47 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Bengtsson 2014-09-15 18:27:20 UTC
CURRENTLY:
> y <- options(list())
Error in options(list()) : list argument has no valid names

whereas

> y <- options(NULL)
> y
named list()


SUGGESTION:
Have options() support zero-length lists.


RELATED:
> y <- par(list())
> y
named list()
> y <- par(NULL)
> y
named list()



> sessionInfo()
R Under development (unstable) (2014-09-08 r66545)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.2.0
Comment 1 Martin Maechler 2014-09-16 08:24:40 UTC
very reasonably wish for consistency -- fulfilled (both R-devel and R-patched)