mercredi 24 juillet 2019

Is there an R function for finding a specific word on a website when web-scraping?

I am searching for the word "magnet" in R to see if some ISD websites have magnet schools and am using mat What function(s) can I use to do this? I would then use "mapply" to import multiple web pages instead of for-loop.

I've tried different web-scraping functions yet seem to get an output of error.

library(rvest) scraping_www.elkhartisd.org <- read_html (www.elkhart.org) scraping_www.elkhartisd.org %>%

I expect the output to be 1 if the word magnet is found on the website, but the actual output is an error.




Aucun commentaire:

Enregistrer un commentaire