remove library references from r scripts