Hi Andy,
On Tuesday, January 31, 2012 08:44:13 AM Liaw, Andy wrote:
I'm not exactly sure if this is a problem with indexing by name; i.e., is
the following behavior by design? The problem is that names or dimnames
that are empty seem to be treated differently, and one can't index by them:
Hi Ista,
When you write a package, you have to anticipate what users will throw at the
code. I can insist that users only input matriices where none of the column
names are empty, but that's not what I wish to impose on the users. I can add
the name if it's empty, but as a user I don't want
I'm not exactly sure if this is a problem with indexing by name; i.e., is the
following behavior by design? The problem is that names or dimnames that are
empty seem to be treated differently, and one can't index by them:
R junk = 1:3
R names(junk) = c(a, b, )
R junk
a b
1 2 3
R junk[]
NA
3 matches
Mail list logo