<div>
Eddi,
</div><div>While loading the data in, maybe, if it is essential to keep names intact, we can probably add an argument, "asis=TRUE" or something like that. But I don't see a reason for doing anything else in `data.table` using duplicate names and trying to catch errors when nothing meaningful can be done with them. Besides data presentation, can you tell any other use with them?</div>
<div><div><br></div><div>Arun</div><div><br></div></div>
<p style="color: #A0A0A8;">On Sunday, November 3, 2013 at 1:31 AM, Eduard Antonyan wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div dir="ltr"><div><div><div>The main usage case I've personally encountered is data presentation (for either self or others), where I would sometimes organize data like so:<br><br></div>category1 name,colname1,colname2,category2 name,colname1,colname2<br>
</div>....numbersandstuff....<br><br></div><div>Also, in general there are many cases I brought up above that generate duplicate names, and I definitely don't want either lost columns or renamed columns as a result - both are data loss that I don't appreciate.<br>
</div></div><div><br><br><div>On Sat, Nov 2, 2013 at 7:10 PM, Steve Lianoglou <span dir="ltr"><<a href="mailto:lianoglou.steve@gene.com" target="_blank">lianoglou.steve@gene.com</a>></span> wrote:<br><blockquote type="cite"><div>Hi,<br>
<br>
On Sat, Nov 2, 2013 at 8:41 AM, Arunkumar Srinivasan<br>
<<a href="mailto:aragorn168b@gmail.com">aragorn168b@gmail.com</a>> wrote:<br>
[snip]<br>
<div>> Overall, I agree keeping duplicate names may help some users. But then, the<br>
> potential side-effects should be marked with warnings/errors distinctly, in<br>
> all cases (and preferably documented).<br>
</div>[/snip]<br>
<br>
I guess I must have missed it, but has anyone anywhere (in this<br>
thread, a FR or something) actually present a (concrete) compelling<br>
situation where allowing duplicate column names was actually useful?<br>
<br>
I'm hard pressed to come up with any situation where (purposefully)<br>
keeping duplicate column names in a data.table has more benefit than<br>
downside. Seems to me that if this ever happens, it most certainly<br>
would be by mistake.<br>
<br>
Can someone help me out here?<br>
<br>
In the case of cbinding two data.tables together that end up having<br>
two duplicate names, I'd imagine unique-ing the names of the<br>
data.tables and firing a warning that this was done would be most<br>
useful (uniqueness priority would be from left to right as the<br>
data.tables are passed into the cbind call)<br>
<span><font color="#888888"><br>
-steve<br>
<br>
--<br>
Steve Lianoglou<br>
Computational Biologist<br>
Bioinformatics and Computational Biology<br>
Genentech<br>
</font></span></div></blockquote></div><br></div>
</div></div></span>
</blockquote>
<div>
<br>
</div>