ascii icon indicating copy to clipboard operation
ascii copied to clipboard

Warnings with R version 3

Open izahn opened this issue 12 years ago • 5 comments

I just upgraded to R version three, and now print.ascii gives warning message

"In rep(rownames, length = nrow(x)) : 'x' is NULL so the result will be NULL"

It would be nice if this were fixed! I'll

izahn avatar May 21 '13 20:05 izahn

In R 3.0.2, ascii() throws a warning on every example show the doc. While this is certainly not the end of the world, it is not the best marketing for your package and rather annoying for users.

library(ascii) data(esoph) ascii(esoph[1:10,]) | | agegp | alcgp | tobgp | ncases | ncontrols | |----+-------+-----------+----------+--------+-----------| | 1 | 25-34 | 0-39g/day | 0-9g/day | 0.00 | 40.00 | | 2 | 25-34 | 0-39g/day | 10-19 | 0.00 | 10.00 | | 3 | 25-34 | 0-39g/day | 20-29 | 0.00 | 6.00 | | 4 | 25-34 | 0-39g/day | 30+ | 0.00 | 5.00 | | 5 | 25-34 | 40-79 | 0-9g/day | 0.00 | 27.00 | | 6 | 25-34 | 40-79 | 10-19 | 0.00 | 7.00 | | 7 | 25-34 | 40-79 | 20-29 | 0.00 | 4.00 | | 8 | 25-34 | 40-79 | 30+ | 0.00 | 7.00 | | 9 | 25-34 | 80-119 | 0-9g/day | 0.00 | 2.00 | | 10 | 25-34 | 80-119 | 10-19 | 0.00 | 1.00 | Warning messages: 1: In rep(rownames, length = nrow(x)) : 'x' is NULL so the result will be NULL 2: In rep(colnames, length = ncol(x)) : 'x' is NULL so the result will be NULL > tab <- table(esoph$agegp, esoph$alcgp) !> ascii(tab) | | 0-39g/day | 40-79 | 80-119 | 120+ | |-------+-----------+-------+--------+------| | 25-34 | 4.00 | 4.00 | 3.00 | 4.00 | | 35-44 | 4.00 | 4.00 | 4.00 | 3.00 | | 45-54 | 4.00 | 4.00 | 4.00 | 4.00 | | 55-64 | 4.00 | 4.00 | 4.00 | 4.00 | | 65-74 | 4.00 | 3.00 | 4.00 | 4.00 | | 75+ | 3.00 | 4.00 | 2.00 | 2.00 | Warning messages: 1: In rep(rownames, length = nrow(x)) : 'x' is NULL so the result will be NULL 2: In rep(colnames, length = ncol(x)) : 'x' is NULL so the result will be NULL !> sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-pc-linux-gnu (64-bit)

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] ascii_2.1

loaded via a namespace (and not attached): [1] compiler_3.0.2 tools_3.0.2

regcl avatar Jan 14 '14 21:01 regcl

I think eusebe fixed it in the 2.2 github version.

kforner avatar Feb 04 '14 14:02 kforner

This does seem to be fixed in source, but there isn't a release reflecting those changes in CRAN. Any chance of cutting a new release?

llasram avatar Jan 25 '16 10:01 llasram

Bump on this request. This git version works great; could you push to CRAN? I just set up a new system and had to re-remember this due to rownames and colnames errors on my output...

jwhendy avatar Mar 16 '16 18:03 jwhendy

Push to CRAN would still be nice!

dwcoates avatar Jan 08 '17 01:01 dwcoates