[datatable-help] Bug report merging of data table with column name with SPACES

Matthew Dowle mdowle at mdowle.plus.com
Tue Oct 9 17:19:21 CEST 2012


No problem. Please confirm your version of data.table is 1.8.2 (latest on
CRAN)? Which contains these bug fixes :

o   merge() with common names, and, all.y=TRUE (or all=TRUE) no longer
returns an error, #2011.

o   merge() is now correct when all=TRUE but there are no common values in
the two data.tables, fixing #2114. Thanks to Karl Ove Hufthammer for
reporting.  Tests added.

If you are running 1.8.2 then please confirm test.data.table() returns
precisely 717 tests passed.

Matthew

> Sorry for being so inprecise,
>
> I attached  a file with two data table objects in it
>
> trying to merge them with
>
> mydataset=merge(mydataset,savings_wide,all.x=TRUE)
>
> results in
>
> Fehler in setcolorder(dt, c(setdiff(names(dt), end), end)) :
>   neworder is length 196 but x has 193 columns.
>
> the column names in the dataset that causes the failing are
>
> [1] "GEO"                           "time"
> "Final consumption expenditure"
> [4] "Gross capital formation"       "Net saving"
>
>
>
> 2012/10/9 Matthew Dowle <mdowle at mdowle.plus.com>
>
>>
>> Hi Johannes,
>>
>> Welcome.
>>
>> Thanks. It would be great if you could provide example data and explain
>> what fails means. Error message or wrong result?
>>
>> But, by chance, is it the same as this one? :
>>
>>
>> https://r-forge.r-project.org/tracker/index.php?func=detail&aid=2193&group_id=240&atid=975
>>
>> Matthew
>>
>>
>> >> I think I found a bug,  merge fails when there are columns with
>> spaces
>> >> in
>> >> the column name
>> >>
>> >> mydataset=merge(dd,savings_wide,all.x=TRUE)
>> >>
>> >> if there are no spaces in column names the merge works.
>> >>
>> >> btw: data.table is a really great tool ! thanks
>> >>
>> >> johannes Kutsam
>> >>
>> >>
>> >> http://johanneskutsam.blogspot.co.at/
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> >
>> > *Pepi - Personaleinsatzplanung*
>> > www.personaleinsatz.at
>> >
>> > *Kutsam - Wo Mode zum Erlebnis wird!*
>> >
>> > Kutsam Gmbh & CoKG
>> > Johannes Kutsam
>> > Hauptplatz 21
>> > 4540 Bad Hall
>> >
>> > 07258 7501
>> > www.kutsam.at
>> > johannes at kutsam.at
>> > _______________________________________________
>> > datatable-help mailing list
>> > datatable-help at lists.r-forge.r-project.org
>> >
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>>
>>
>>
>
>
> --
>
> *Pepi - Personaleinsatzplanung*
> www.personaleinsatz.at
>
> *Kutsam - Wo Mode zum Erlebnis wird!*
>
> Kutsam Gmbh & CoKG
> Johannes Kutsam
> Hauptplatz 21
> 4540 Bad Hall
>
> 07258 7501
> www.kutsam.at
> johannes at kutsam.at
>




More information about the datatable-help mailing list