[R] Unintended behaviour (possibly bugs)

Alexey Shipunov d@cty|orh|z@ @end|ng |rom gm@||@com
Sun Feb 16 13:21:33 CET 2020

Dear list,

I have been advised to share these with R-help instead of filling the
bug report:

1) dotchart() does not allow to see the left axis title ('ylab') and
cannot change the left margin (outer margin 2) of the plot

The code:

aa <- table(c(1, 1, 1, 2, 2, 3))
dotchart(aa, ylab="Ylab") # does not show 'ylab'
old.par <- par(mar=c(1, 10, 1, 1)) ; dotchart(aa, ylab="Ylab") ;
par(old.par) # does not change left margin

Possible solution:

I researched the problem and think that the dotchart() code will need
few corrections. If there is an interest, I can post it here; or you
can look at the code of shipunov::Dotchart1() function.

2) example(hist) includes two "wrong" and "extreme" examples which
slow down and even crash R on some systems; this make it unsuitable
for demonstration in the class and strikes beginners in R who just
want to understand how hist() works. Actually, I did it last week (I
was not aware of these examples), and in the class two computers hang,
and many others were extremely slow.

The code:


Possible solution:

If R maintainers will enclose parts of "hist" example in \dontrun{},
this will allow to see the code but in the same time will not strike
beginners in R who just
want to understand how hist() works. They will still be possible to
run with example(..., run.dontrun=TRUE).

With best wishes,

Alexey Shipunov

More information about the R-help mailing list