[Rd] Redundant code in 'split.default' in R devel
m@echler @ending from @t@t@m@th@ethz@ch
Mon Oct 8 12:53:22 CEST 2018
>>>>> Suharto Anggono via R-devel
>>>>> on Fri, 5 Oct 2018 17:13:30 +0000 writes:
> After r75387, function 'split.default' in R devel still has this part that no longer has effect.
> lf <- levels(f)
> y <- vector("list", length(lf))
> names(y) <- lf
Indeed --> removed now.
Thank you very much, Suharto!
"Exercise" (tongue in cheek) to the reader:
Write a "code walker" (an R function itself) that takes an
argument 'expr', which is an R expression (think of a *body* of a
function 'f') and is able to mark e.g. warn about such
"dead" code in 'expr' (and hence in function 'f' ...) --- with
the important underlying assumption that all functions that are
called inside 'f' have "no side effects".
More information about the R-devel