I have an 600 line script in R which I've been editing many times by cutting and adding entire chunks. The script loads ~20 packages at the beginning and now I don't know if all of them end up being used. Therefore I have the following practical questions:
- Will removing unnecessary packages improve performance/memory usage?
- If yes, how can I check and remove packages that are loaded but not end up being used