[datatable-help] error in rbindlist

G See gsee000 at gmail.com
Sat Mar 21 22:36:50 CET 2015


Hi Farrel,

MRE = Minimal Reproducible Example.  It would go a long way in helping
to diagnose the issue.

I can generate the error you're getting by calling as.ITime() on a
string that doesn't look like a time.

    > as.ITime("")
    Error in if (any(neg)) res[neg] = paste("-", res[neg], sep = "") :
      missing value where TRUE/FALSE needed

I'd start by looking to for values in that column that don't look like the rest.

For example

    specimens[grep("\\d+:\\d+:\\d+", kbdtimespecim, invert=TRUE)]

That might help you narrow it down enough to be able to create
something reproducible with a small set of non-sensitive data.

HTH,
Garrett


On Sat, Mar 21, 2015 at 3:22 PM, Farrel Buchinsky <fjbuch at gmail.com> wrote:
> Dear Arun
>
> What is "MRE"?
> There was no NA
>> anyNA(specimens$kbdtimespecim)
> [1] FALSE
>
> Farrel Buchinsky
> Google Voice Tel: (412) 567-7870
>
> On Mon, Mar 16, 2015 at 1:55 PM, Arunkumar Srinivasan
> <aragorn168b at gmail.com> wrote:
>>
>> Without an MRE my best guess is that you’ve a NA somewhere.
>>
>> --
>> Arun
>>
>> On 9 Mar 2015 at 19:22:15, Farrel Buchinsky (fjbuch at gmail.com) wrote:
>>
>> I used a series of statements such as this
>>
>> l = list(specs.post.crash, specimens[,1:26, with=FALSE])
>>
>> to work out which set of columns worked and which did not.
>>
>> I found the offending column
>>
>> kbdtimespecim is a column from sepcimens. It is the 27 th column. With it
>> included the whole rbindlist collapses. Without it, it works.
>>
>> "15:04:48" "15:02:52" "15:06:44" "16:07:22" "16:07:22" "16:07:22"
>>
>> > class(specimens$kbdtimespecim)
>> [1] "ITime"
>>
>> Any idea why?
>>
>> Farrel Buchinsky
>> Google Voice Tel: (412) 567-7870
>>
>> On Mon, Mar 9, 2015 at 2:08 PM, Farrel Buchinsky <fjbuch at gmail.com> wrote:
>>>
>>> I am doing something really simple but getting an error I do not know how
>>> to troubleshoot.
>>>
>>> l = list(specimens, specs.post.crash)
>>> rbindlist(l, fill = TRUE)
>>>
>>> specimens has about 5 columns and specs.post.crash has about 29.
>>>
>>> I get this error. I cannot find anyone else with this problem. I cannot
>>> share my actual data.table since it has private information.
>>>
>>> Error in if (any(neg)) res[neg] = paste("-", res[neg], sep = "") :
>>>   missing value where TRUE/FALSE needed
>>>
>>> Interested in the off-the-top-of-your-head suggestions of where to
>>> troubleshoot.
>>> Using {R package version 1.9.5}
>>>
>>>
>>> Farrel Buchinsky
>>> Google Voice Tel: (412) 567-7870
>>
>>
>> _______________________________________________
>> 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
>
>
>
> _______________________________________________
> 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


More information about the datatable-help mailing list