Deparsing raw vectors with names

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Deparsing raw vectors with names


deparse(structure(as.raw(1), .Names=c('a'))) gives "as.raw(c(a = 0x01))"
in 3.5.1 and later (actually tested on 3.5.1, 3.6.1 and devel). If you
execute as.raw(c(a = 0x01)), you get a raw vector without the names.

If the stripping of the names is the correct behavior of as.raw (I would
think it is), then perhaps deparse should use the old behavior for raw
vectors. On R-3.4.1 it gives: "structure(as.raw(0x01), .Names = 'a')".


[hidden email] mailing list