1

What's wrong with my code? Here is my code:

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

Here is the error message:

Error in paths_allowed("https://collections.ed.ac.uk/art)") : could not find function "paths_allowed"

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453

1 Answers1

2

paths_allowed is a function of the package robotstxt.

To use the function, you need to install the package first. Then, after loading the package with library, you will be able to use your function.

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

If you don't want to load the package you can alternatively call the function with :: operator in this way:

robotstxt::paths_allowed("https://collections.ed.ac.uk/art)")
Edo
  • 7,567
  • 2
  • 9
  • 19
  • 2
    may want to note that the package only needs to be installed once per R installation (unlike `library()`, which needs to be called in each new R session) – Ben Bolker Oct 30 '20 at 14:13