On Oct 11, 2012, at 16:02 , Bert Gunter wrote:
> ... and further
>
>> identical(as.list(df2),as.list(df1))
> [1] TRUE
>
> in R 2.15.0
>
> Not sure whether these sorts of degenerate cases are of much value,
> though. But I'll leave that for the wizards.
Looks like this is easier to fix that to
... and further
> identical(as.list(df2),as.list(df1))
[1] TRUE
in R 2.15.0
Not sure whether these sorts of degenerate cases are of much value,
though. But I'll leave that for the wizards.
-- Bert
On Wed, Oct 10, 2012 at 11:22 PM, Hervé Pagès wrote:
> Hi,
>
> Two ways to create what should no
Hi,
Two ways to create what should normally be the same data frame:
> df1 <- data.frame(a=character(0), b=character(0))> df1
[1] a b
<0 rows> (or 0-length row.names)
> df2 <- as.data.frame(matrix(character(0), ncol=2,
dimnames=list(NULL, letters[1:2])))
> df2
[1] a b
<0 rows> (o