Optimizations and workarounds for bad R repositories