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.


      Thanks,
      Spencer

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to