From richierocks at gmail.com  Thu Aug 21 15:26:20 2014
From: richierocks at gmail.com (Richard Cotton)
Date: Thu, 21 Aug 2014 16:26:20 +0300
Subject: [Rd] The behaviour of setting names differs between lists and
	atomic vectors
Message-ID: <CAPp_+=fwKAD19GAce7veeZMndmZ9W7aKm+MN393ZCz-jD=80fQ@mail.gmail.com>

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 element in the list has been changed to
'a', 'backspace'.

Is this behaviour intended, or a bug?

-- 
Regards,
Richie



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