[Rd] Potential bugs in table dnn

SOEIRO Thomas Thom@@@SOEIRO @end|ng |rom @p-hm@|r
Thu Oct 14 12:08:48 CEST 2021


Dear Martin,

Thank you for the perfect fix. It fixes both issues in the 1-dim case (i.e. automatic dnn *and* disregard dnn/names in ...), as well as the documentation.



While working on table, may be this should be an error?

table(warpbreaks[2], warpbreaks[3]) 
#      
#       1:3
#   1:2   0
# Warning messages:
# 1: In xtfrm.data.frame(x) : cannot xtfrm data frames
# 2: In xtfrm.data.frame(x) : cannot xtfrm data frames

Best regards,

Thomas

> -----Message d'origine-----
> De : Martin Maechler [mailto:maechler using stat.math.ethz.ch]
> Envoyé : jeudi 14 octobre 2021 11:44
> À : SOEIRO Thomas
> Cc : R Development List
> Objet : Re: [Rd] Potential bugs in table dnn
> 
> EMAIL EXTERNE - TRAITER AVEC PRÉCAUTION LIENS ET FICHIERS
> 
> Dear Thomas,
> 
> actually, I have in the mean time already applied the changes I think are
> needed, both in the code and in the documentation.
> 
> So, in this case, it may be a waste of time to still open a bugzilla issue, I think.
> 
> Here are my current changes (not yet committed; of course I would also add
> a NEWS entry, mentioning you):
> 
> 
> Index: src/library/base/R/table.R
> ==========================================================
> =========
> 53c53
> <       if (length(dnn) != length(args))
> ---
> >       if(length(args) == 1L || length(dnn) != length(args))
> Index: src/library/base/man/table.Rd
> ==========================================================
> =========
> 23c23
> <   \code{table} uses the cross-classifying factors to build a contingency
> ---
> >   \code{table} uses cross-classifying factors to build a contingency
> 41c41,42
> <     (including character strings), or a list (or data frame) whose
> ---
> >     (including numbers or character strings), or a \code{\link{list}} (such
> >     as a data frame) whose
> 67c68,69
> <   If the argument \code{dnn} is not supplied, the internal function
> ---
> >   If the argument \code{dnn} is not supplied \emph{and} if \code{\dots} is
> >   not one \code{list} with its own \code{\link{names}()}, the internal
> > function
> 
> 
> 
> With regards,
> Martin


More information about the R-devel mailing list