Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何使用允许的路径?_R_Rvest - Fatal编程技术网

R 如何使用允许的路径?

R 如何使用允许的路径?,r,rvest,R,Rvest,我的代码怎么了? 这是我的密码: 允许的路径(“https://collections.ed.ac.uk/art)") 以下是错误消息: 允许的路径中存在错误(“https://collections.ed.ac.uk/art)") : 找不到函数“允许的路径” paths\u allowed是软件包robotstxt的一个功能 要使用该功能,您需要先安装软件包。 然后,在使用库加载包后,您将能够使用您的函数 install.packages("robotstxt") li

我的代码怎么了? 这是我的密码:

允许的路径(“https://collections.ed.ac.uk/art)")
以下是错误消息:

允许的路径中存在错误(“https://collections.ed.ac.uk/art)") : 找不到函数“允许的路径”


paths\u allowed
是软件包
robotstxt
的一个功能

要使用该功能,您需要先安装软件包。 然后,在使用
加载包后,您将能够使用您的函数

install.packages("robotstxt")
library(robotstxt)
paths_allowed("https://collections.ed.ac.uk/art)")
如果您不想加载包,也可以使用
操作符调用函数,方法如下:

robotstxt::paths_allowed("https://collections.ed.ac.uk/art)")

在调用函数之前,尝试启动
库(robotstxt)
它说“没有名为robotstxt的包”可能需要注意的是,每个R安装只需要安装一次该包(不同于
库()
,它需要在每个新的R会话中调用)