Bug 16686

Summary: dput on alist (even with control='all') gives invalid syntax when argument is missing
Product: R Reporter: Benjamin Tyner <btyner>
Component: LanguageAssignee: R-core <R-core>
Status: CLOSED FIXED    
Severity: enhancement CC: murdoch
Priority: P5    
Version: R 3.2.3   
Hardware: Other   
OS: Other   

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!