[Rd] Display problem with named raw vectors

Herve Pages hpages at fhcrc.org
Wed Oct 4 05:58:54 CEST 2006


Hi,


I found that displaying a raw vector with long names is not
as pretty as for other types of named vectors:

    > r <- charToRaw("Mz")
    > r
    [1] 4d 7a
    > names(r) <- c("M", "zzzzzz")
    > r
         M zzzzzz
    4d 7a

The names and the values are not aligned :-(

    > i <- as.integer(r)
    > i
    [1]  77 122
    > names(i) <- c("M", "zzzzzz")
    > i
         M zzzzzz
        77    122

Much better :-)
(Note that the names were lost during coercion... surprising
but documented.)

Cheers,
H.




More information about the R-devel mailing list