What is the difference between require() and library()?

前端 未结 8 1224
情话喂你
情话喂你 2020-11-22 11:00

What is the difference between require() and library()?

8条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 11:45

    There's not much of one in everyday work.

    However, according to the documentation for both functions (accessed by putting a ? before the function name and hitting enter), require is used inside functions, as it outputs a warning and continues if the package is not found, whereas library will throw an error.

提交回复
热议问题