[Rd] Unnecessary lines in stem.c?

S Ellison S.Ellison at LGCGroup.com
Fri Feb 16 17:03:00 CET 2018

A discussion on r-help led me to look at stem.c at

Lines 76-77 appear superfluous. They sit inside a condition, and set mu, as follows:
	if (k*(k-4)*(k-8) == 0) mu = 5;
	if ((k-1)*(k-5)*(k-6) == 0) mu = 20;

But mu is set unconditionally to 10 on line 84, and that is followed by conditional assignments (on line 85-6) identical to lines 76-77.

It looks like a couple of lines got left inside a condition that are no longer needed there. If that is correct, is it worth removing the superfluous lines, for future coders' benefit?

S Ellison

This email and any attachments are confidential. Any use...{{dropped:8}}

More information about the R-devel mailing list