[R] function to compare lengths?
Spencer Graves
spencer.graves at structuremonitoring.com
Mon May 5 22:41:55 CEST 2014
On 5/5/2014 1:19 PM, Duncan Murdoch wrote:
> On 05/05/2014, 3:39 PM, Spencer Graves wrote:
>> Is there a function someplace to compare lengths?
>>
>>
>> For example, if "longer object length is not a multiple of
>> shorter object length", "a/b" issues a warning. I'd like something with
>> more flexibility in what is reported.
>>
>>
>> Hadley Wickham's "testthat" and "assertthat" packages provide
>> tools for testing and comparing objects, but I didn't see this.
>>
>>
>> I'm starting to write "compareLengths(x, y, name.x=NULL,
>> name.y=NULL, Source='', compFun=c('length', 'NROW'),
>> action=c(comparable='', incomparable='warning'), maxChar=20, ...)".
>> However, I'd prefer to use an existing function if I can find one that I
>> feel is adequate.
>>
>
> You posted this question (with a different subject line) yesterday.
> What is wrong with the response I sent then?
Your earlier response was great, but I didn't see it until I
received this reply.
I apologize for sending essentially the same question twice. It
was not my intent. I missed Duncan's reply and couldn't find my
original email in my "sent" folder. I concluded erroneously that I may
have deleted the draft rather than sending it.
Thanks again,
Spencer Graves
>
> Duncan Murdoch
>
More information about the R-help
mailing list