Note that there are some explanatory texts on larger screens.

plurals
  1. PO`data.table` error: "reorder received irregular lengthed list" in setkey
    primarykey
    data
    text
    <p>I have a fairly basic <code>data.table</code> in R, with 250k rows and 90 columns. I am trying to key the <code>data.table</code> on one of the columns which is of class <code>character</code>. When I call:</p> <pre><code>setkey(my.dt,my.column) </code></pre> <p>I receive the following cryptic error message:</p> <pre><code>"Error in setkeyv(x, cols, verbose=verbose) : reorder received irregular lengthed list" </code></pre> <p>I have found a <a href="http://lists.r-forge.r-project.org/pipermail/datatable-commits/2011-November/000377.html" rel="nofollow">source-code commit with this message</a>, but can't quite decipher what it means. My key column contains no NA or blank values, seems perfectly reasonable to look at (it contains stock tickers), and behaves well with the default <code>order()</code> command. </p> <p>Even more frustrating, the following code completes correctly:</p> <pre><code>first.dt &lt;- my.dt[1:100000] setkey(first.dt,my.column) second.dt &lt;- my.dt[100001:nrow(my.dt] setkey(second.dt,my.column) </code></pre> <p>I have no idea what could be going on here. Any tips?</p> <p>Edit 1: I have confirmed every value in the key fits a fairly standard format:</p> <pre><code>&gt; length(grep("[A-Z]{3,4}\\.[A-Z]{2}",my.dt$my.column)) == nrow(my.dt) [1] TRUE </code></pre> <p>Edit 2: My system info is below (note that I'm actually using Windows 7). I am using data.table version 1.8.</p> <pre><code>&gt; Sys.info() sysname release version nodename machine login "Windows" "Server 2008 x64" "build 7600" "WIN-9RH28AH0CKG" "x86-64" "Administrator" user effective_user "Administrator" "Administrator" </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload