Bug 16686 - dput on alist (even with control='all') gives invalid syntax when argument is missing
Summary: dput on alist (even with control='all') gives invalid syntax when argument is...
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Language (show other bugs)
Version: R 3.2.3
Hardware: Other Other
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-01-28 20:53 UTC by Benjamin Tyner
Modified: 2016-01-29 22:50 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 Benjamin Tyner 2016-01-28 20:53:56 UTC
For example:

> a <- alist(one = 1, two = )
> print(a)
$one
[1] 1

$two


> dput(a, control = "all")
structure(list(one = 1, two = quote()), .Names = c("one", "two"))

> structure(list(one = 1, two = quote()), .Names = c("one", "two"))
Error in quote() : 0 arguments passed to 'quote' which requires 1
1: structure(list(one = 1, two = quote()), .Names = c("one", "two"))
Comment 1 Duncan Murdoch 2016-01-29 12:19:04 UTC
Thanks, fixed in R-devel, soon in R-patched.
Comment 2 Benjamin Tyner 2016-01-29 22:50:48 UTC
Thanks Duncan!