I am crawling a website to R but error pops up: ! Input must be a vector, not an environment.
I attempt to crawl a website by doing
` simple <- read_html("https://en.wikipedia.org/wiki/Kargil_War")
a <- simple %>% html_nodes("p") %>% html_text() `
The code works at the beginning but error pops up later:
Error in stop_vctrs():
! Input must be a vector, not an environment.
Run rlang::last_error() to see where the error occurred.
How can I solve this? Thank you!
I've seen this error when using version 1.5.0 of the stringr package. Reverting to stringr version 1.4.0 fixed your example for me.
require(devtools)
install_version("stringr", version = "1.4.0" )
Had the same problem, updating the vctrs worked for me.
install.packages("vctrs")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With