Re: [Rd] The behaviour of setting names differs between lists and atomic vectors

2014-08-25 Thread Martin Maechler
> peter dalgaard > on Thu, 21 Aug 2014 16:11:38 +0200 writes: > On 21 Aug 2014, at 15:47 , Duncan Murdoch > wrote: >> On 21/08/2014 9:26 AM, Richard Cotton wrote: >>> If you set the names in a list, some cat-style >>> processing seems to happen. For example, bac

Re: [Rd] The behaviour of setting names differs between lists and atomic vectors

2014-08-21 Thread peter dalgaard
On 21 Aug 2014, at 15:47 , Duncan Murdoch wrote: > On 21/08/2014 9:26 AM, Richard Cotton wrote: >> If you set the names in a list, some cat-style processing seems to >> happen. For example, backslashes are modified. This behaviour >> doesn't happen with atomic vectors. Compare, for example: >

Re: [Rd] The behaviour of setting names differs between lists and atomic vectors

2014-08-21 Thread Duncan Murdoch
On 21/08/2014 9:26 AM, Richard Cotton wrote: If you set the names in a list, some cat-style processing seems to happen. For example, backslashes are modified. This behaviour doesn't happen with atomic vectors. Compare, for example: setNames(1, "a\\b") ## a\\b ## 1 setNames(list(1), "a\\b")

[Rd] The behaviour of setting names differs between lists and atomic vectors

2014-08-21 Thread Richard Cotton
If you set the names in a list, some cat-style processing seems to happen. For example, backslashes are modified. This behaviour doesn't happen with atomic vectors. Compare, for example: setNames(1, "a\\b") ## a\\b ## 1 setNames(list(1), "a\\b") ## $`a\b` ## [1] 1 Notice that the name of the