Yes... Also, of course, the sentence after colon does not the describe the cause of the mismatch, e.g.
> all.equal(c(1,NA,NA), c(NA,NA,3)) [1] "'is.NA' value mismatch: 2 in current 2 in target" could be confusing. Perhaps "is.na() mismatch (2 positions)", with the count calculated as sum(is.na(current) != is.na(target)) instead? Or you could give both off-diagonal elements of the confusion matrix: "target-only: 1, current-only: 1" but actually, the whole current/target terminology is somewhat unclear. -pd > On 1 Mar 2023, at 13:53 , Antoine Fabri <antoine.fa...@gmail.com> wrote: > > dear r-devel, > > This has probably been forever like this but is this satisfying ? > > all.equal(c(1,NA,NA), c(1,NA,3)) > #> [1] "'is.NA' value mismatch: 1 in current 2 in target" > > is.NA() doesn't exist (is.na() does), and is.na() is never 1 or 2. > > In this example it's obvious that we're counting missing values, in a > general situation I believe it isn't (we might understand it as the > position of the first NA for instance). > > I would expect something like "'amount of missing values mismatch: 1 in > current 2 in target" > > Thanks, > > Antoine > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel