[feature] more general R dependency check