From gunter.berton at gene.com  Thu Sep 13 22:48:29 2012
From: gunter.berton at gene.com (Bert Gunter)
Date: Thu, 13 Sep 2012 13:48:29 -0700
Subject: [Rd] as.data.frame.character lacks nm= argument
In-Reply-To: <E66794E69CFDE04D9A70842786030B9331BFED@PA-MBX04.na.tibco.com>
References: <E66794E69CFDE04D9A70842786030B9331BFED@PA-MBX04.na.tibco.com>
Message-ID: <CACk-te1N4cN=cNeunL8zSn6SUVRis+rgbb8gvVg7mx61b2wdbQ@mail.gmail.com>

Bill:

as.data.frame.character() has no nm, argument, so providing one causes
the error as you can see from the code. Presumably, this is what you
meant by bug/inconsistency, right?

-- Bert

On Thu, Sep 13, 2012 at 1:32 PM, William Dunlap <wdunlap at tibco.com> wrote:
> Is the following behavior with as.data.frame(nm=...) a bug?  It is an inconsistency:
>
>> as.data.frame(LETTERS[1:10], nm="FirstTenLetters")
> Error in as.data.frame.vector(x, ..., nm = nm) :
>   formal argument "nm" matched by multiple actual arguments
>
> nm= works for integer arguments:
>
>> as.data.frame(1:10, nm="OneToTen")
>    OneToTen
> 1         1
> 2         2
> 3         3
> 4         4
> 5         5
> 6         6
> 7         7
> 8         8
> 9         9
> 10       10
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm



[Rd] as.data.frame.character lacks nm= argument
Bert Gunter