Warning: replacing previous import ‘head’ when loading ‘utils’ in R

前端 未结 2 914
南笙
南笙 2020-12-10 12:00

When loading the RTextTools package from CRAN, I get the following warnings:

Warning messages:
1: replacing previous import ‘head’ when loading

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-10 12:16

    In general, this problem is often caused by having import(somepackage) in the namespace as well as importFrom(somepackage, somefunction).

    Equivalently, using roxgyen2, having both #' @import somepackage and #' @importFrom somepackage somefunction.

    The best practice solution is to remove the import statement ans keep only importFrom.

提交回复
热议问题