I've inherited a large R codebase which has grown over a few years and a few different developers.

It contains many things I'd like to delete:
- Unused functions
- Variable definitions that are never called
- Unreachable code

I'd write that myself, it would even be fun, but I don't want to reinvent the wheel.
Is there an R package that can find these things?

I've heard of lintr, but I'm not sure if it's the right tool, since, unfortunately, the code is in a folder (not a package) with many R files that are sourced from one master file and lintr can only check a single file or an actual package, from what I understand. A workaround of course would be to concatenate all files into one R script.

I'd appreciate any hints on how to best solve this.

Thanks in advance,
Alex

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to