library(dplyr)
x <- 1:10
lead(x)
Running the above code just gives me the following error:
"Error in UseMethod("lead") : no applicable method for 'lead' applied to an object of class "c('integer', 'numeric')""
I have tried a bunch of things like as.numeric and as.vector, but I'm consistently getting this error.