tidyverse / stringr

A fresh approach to string manipulation in R

Home Page:https://stringr.tidyverse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

str_locate function returns error - Input must be a vector, not an environment

vamshimupparaju opened this issue · comments

Hi Team,

I am trying to use the function stringr in one of my requirement facing the below error.

Error in stop_vctrs():
! Input must be a vector, not an environment.
Run rlang::last_error() to see where the error occurred.

More details below the example I have used to test the function -

strings <- c(
"apple",
"219 733 8965",
"329-293-8753",
"Work: 579-499-7527; Home: 543.355.3679"
)
phone <- "([2-9][0-9]{2})- .- ."
loc <- str_locate(strings, phone)

Error in stop_vctrs():
! Input must be a vector, not an environment.
Run rlang::last_error() to see where the error occurred.

Please help me out in this issue.

Thanks & Regards,
Vamshi Krishna Mupparaju

Please close all open instances of R/RStudio, and then run install.packages("vctrs").