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

Matthew Dowle mdowle at mdowle.plus.com
Thu Oct 11 10:46:51 CEST 2012


Johannes,

Seems like a bug then.  Please could you file a
bug.report(package="data.table") so it doesn't get forgetten. Either
attach the files to the bug in the tracker, or include a link to this
thread in the body of the report.

A wild guess that one of the objects has one column name that's
duplicated. But I thought we'd dealt with that. Maybe both have the same
column name duplicated or something similar.

Thanks, Matthew


> Matthew,
> thats the messages I got:
>
> matthew,
> i am using the lasted binary;
>
> library(data.table)data.table 1.8.2  For help type: help("data.table")
>
> test.data.table()
> ...
>
> All 717 tests in test.data.table() completed ok in 11.356sec
>
>
> the tests all passed - after I changed the system language to english
> Sys.setenv(LANG="EN")
> (without setting the language 33 tests would fail)
>
>
>
> 2012/10/9 Matthew Dowle <mdowle at mdowle.plus.com>
>
>>
>> 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
>> >
>>
>>
>>
>
>
> --
>
> *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