> It appears that 'dput'/'deparse' is returning an invalid object when
> there is a named character vector inside a list. Here is a minimal
> example that reproduces the issue:
>> z <- list(a=c(b="foo"))
> List of 1
> $ a: Named chr "foo"
> ..- attr(*, "names")= chr "b"
> list(a = b = "foo")
> Error in parse(text = deparse(z)) : <text>:1:12: unexpected '='
> 1: list(a = b =
> But it works fine if you just provide a named character vector:
> structure("foo", .Names = "b")
("of course", because that had been tested quite extensively).
Thank you for reporting. It is clearly a bug.
We're happy if your report it formally (https://bugs.r-project.org),
but as it is only in "R-devel", the development version of R, to
report here is indeed perfect.