Error in `vec_as_location()`:

Hey everyone, I am pretty new to coding but I have this issue and I can't seem to figure this problem out
install.packages("tidyverse")
library(tidyverse)
library(Lahman)
getwd()
spahn <- read_csv("data/spahn.csv")

doing this i get this error

Error in vec_as_location():
! ... must be empty.
x Problematic argument:

  • call = call
    Run rlang::last_error() to see where the error occurred.

I'm pretty sure I have my working directory set up correctly, and I'm following code from a book and this is how its supposed to look.
If anyone has any idea how to fix it would be much appreciated, thanks

My advice

  1. start a new r session / restart
  2. install vctrs install.packages("vctrs")
  3. install readr install.packages("readr")
  4. try your code again
1 Like

This worked! Thank you so much

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.