<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Here: <a href="https://r-forge.r-project.org/tracker/?atid=975&group_id=240&func=browse">https://r-forge.r-project.org/tracker/?atid=975&group_id=240&func=browse</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">You've to create an account, but that's super easy.</div> <div id="bloop_sign_1392414164005579008" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">Arun</div></div> <div style="color:gray"><hr style="style:linear">From: <span style="color:black">Malcolm Hawkes</span> <a href="mailto:mhawkes@gcmlp.com">Malcolm Hawkes</a><br>Reply: <span style="color:black">Malcolm Hawkes</span> <a href="mailto:mhawkes@gcmlp.com">mhawkes@gcmlp.com</a><br>Date: <span style="color:black">February 14, 2014 at 10:42:07 PM</span><br>To: <span style="color:black">Arunkumar Srinivasan</span> <a href="mailto:aragorn168b@gmail.com">aragorn168b@gmail.com</a>, <span style="color:black">datatable-help@lists.r-forge.r-project.org</span> <a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a><br>Subject: <span style="color:black"> RE: [datatable-help] CJ and setkey sort differently <br></span></div> <blockquote type="cite" class="clean_bq"><span><div lang="EN-US" link="blue" vlink="purple" xml:lang="EN-US"><div>





<!--[if !mso]><![endif]-->

<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<title></title>


<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
Arun</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
 </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
Oops, yes it should.  And</span> <span style="font-size:10.0pt;font-family:"Courier New"">vec1 <-
c("Corp", "CORP")</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
 </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
Took me while to track down, what was causing but got it in the
end</span> <span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">J</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
 </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
Where / how do I file a bug report ?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
 </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
Thanks</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
 </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
Malcolm</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
 </span></p>
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
Malcolm Hawkes</span></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
On-Site Consultant, Investments - RiskManagement</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
Grosvenor Capital Management, L.P.</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
900 N. Michigan Avenue, Suite 1100</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
Chicago, IL  60611</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
mhawkes@gcmlp.com</span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
 </span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
From:</span></b> <span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
Arunkumar Srinivasan [mailto:aragorn168b@gmail.com]<br>
<b>Sent:</b> Friday, February 14, 2014 3:38 PM<br>
<b>To:</b> datatable-help@lists.r-forge.r-project.org; Malcolm
Hawkes<br>
<b>Subject:</b> Re: [datatable-help] CJ and setkey sort
differently</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div id="bloop_customfont">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
Malcolm,</span></p>
</div>
<div id="bloop_customfont">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
 </span></p>
</div>
<div id="bloop_customfont">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
Thanks for the nice report. I suppose your `dt` creation should be:
`dt <- CJ(vec1, vec2)`. The reason is pretty clear. It's an easy
fix. Could you please file a bug report? Thank you.</span></p>
</div>
<div id="bloop_customfont">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
 </span></p>
</div>
<div id="bloop_sign_1392413856469431808">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
Arun</span></p>
</div>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center"></div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:gray">
From: </span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black">Malcolm
Hawkes</span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:gray"><a href="mailto:mhawkes@gcmlp.com">Malcolm
Hawkes</a><br>
Reply: </span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black">Malcolm
Hawkes</span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:gray"><a href="mailto:mhawkes@gcmlp.com">mhawkes@gcmlp.com</a><br>

Date: </span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black">February
14, 2014 at 10:34:21 PM</span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:gray"><br>

To: </span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black"><a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a></span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:gray"><a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a><br>

Subject: </span> <span style="font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black">
[datatable-help] CJ and setkey sort differently</span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Ran in to
the warning</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Warning in
setkeyv(x, cols, verbose = verbose) :</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> 
Already keyed by this key but had invalid row order, key rebuilt.
If you didn't go under the hood please let datatable-help know so
the root cause can be fixed.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">You can
reproduce it with</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">vec1 <-
c("CMDTY", "Copper", "CORPOAS")</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">vec2
<-  1:3</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">dt <-
CJ(vec1, Date)</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">setkey(dt,
V1, V2)</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Issue seems
to be that CJ (..., sorted = TRUE) and setkey want to sort the
character data in different orders, one case-sensitive, one
not.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">CJ
creates</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
     V1 V2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
1: Corp  1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
2: Corp  2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
3: Corp  3</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
4: CORP  1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
5: CORP  2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
6: CORP  3</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">And it’s
keyed as you would expect by V1 then V2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CC7833;background:#323232">
></span><span style="font-size:10.0pt;font-family:Consolas;color:#CC7833"><span style="background:#323232">key(dt)</span></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
[1] "V1" "V2"</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">But after
doing setkey you have</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
     V1 V2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
1: CORP  1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
2: CORP  2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
3: CORP  3</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
4: Corp  1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
5: Corp  2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:#CFCFCF;background:#323232">
6: Corp  3</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">data.table
version 1.8.10</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">>
R.version</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">              
_                          </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">platform      
x86_64-w64-mingw32         </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">arch          
x86_64                     </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">os            
mingw32                    </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">system        
x86_64,
mingw32            </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">status                                    </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">major         
3                          </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">minor         
0.2                        </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">year          
2013                       </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">month         
09                         </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">day           
25                         </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">svn
rev       
63987                      </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">language      
R                          </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">version.string
R version 3.0.2 (2013-09-25)</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">nickname      
Frisbee
Sailing            </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">></span><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif""> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
Malcolm Hawkes</span></b></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
On-Site Consultant, Investments - RiskManagement</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
Grosvenor Capital Management, L.P.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
900 N. Michigan Avenue, Suite 1100</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
Chicago, IL  60611</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#595959">
<a href="mailto:mhawkes@gcmlp.com">mhawkes@gcmlp.com</a></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">---</span></p>
</div>
<div style="margin-top:14.0pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
 </span></p>
</div>
<div style="margin-top:14.0pt">
<p class="MsoNormal"><span style="font-size:10.0pt">Disclosure and
Statement of Confidentiality</span></p>
</div>
<div style="margin-top:14.0pt">
<p class="MsoNormal"> </p>
</div>
<div style="margin-top:14.0pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
 </span></p>
</div>
<div style="margin-top:14.0pt">
<p class="MsoNormal"><span style="font-size:10.0pt">Grosvenor
Securities LLC, Member FINRA, Serves as Placement Agent or
Distributor for Certain Investment Products Managed/Advised by GCM
Grosvenor-Affiliated Entities.</span></p>
</div>
<div style="margin-top:14.0pt">
<p class="MsoNormal"> </p>
</div>
<div style="margin-top:14.0pt">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
 </span></p>
</div>
<div style="margin-top:14.0pt">
<p class="MsoNormal"><span style="font-size:10.0pt">The contents of
this e-mail message and its attachments (if any) may be proprietary
and/or confidential and are intended solely for the addressee(s)
hereof. In addition, this e-mail message and its attachments (if
any) may be subject to non-disclosure or confidentiality agreements
or applicable legal privileges, including privileges protecting
communications between attorneys or solicitors and their clients or
the work product of attorneys and solicitors. If you are not the
named addressee, or if this e-mail message has been addressed to
you in error, please do not read, disclose, reproduce, distribute,
disseminate or otherwise use this message or any of its
attachments. Delivery of this e-mail message to any person other
than the intended recipient(s) is not intended in any way to waive
privilege or confidentiality. If you have received this e-mail
message in error, please alert the sender by reply e-mail; we also
request that you immediately delete this e-mail message and its
attachments (if any). Grosvenor Capital Management, L.P., GCM
Customized Fund Investment Group, L.P. and their affiliated
entities (collectively, “GCM Grosvenor”) reserve the right to
monitor all e-mail communications through their networks. GCM
Grosvenor gives no assurances that this e-mail message and its
attachments (if any) are free of viruses and other harmful
code.</span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica","sans-serif"">
_______________________________________________<br>
datatable-help mailing list<br>
<a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a><br>

<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help">
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a></span></p>
</div>
</div>
</blockquote>
</div>


</div></div></span></blockquote></body></html>