Residence time velocity of Protected Areas

I am working on a thesis. I try to calculate Residence time of Protected area(according to climate change). But I have some problems and get error like ‘‘In [.data.table(RT, , :=(v, raster::extract(vel, pg, small = TRUE, :
Column ‘v’ does not exist to remove’’
and my results like on the picture. My PA polygon shp file exported from Arcmap. and use code like below
library(cartogram)
library(ncdf4)
library(raster)
library(VoCC)
library(rgeos)
library(rasterVis)
library(gridExtra)
library(doParallel)
library(foreach)
library(scales)
library(data.table)
library(mapplots)
library(RColorBrewer)
library(ggplot2)
library(rgdal)
library(sf)
library(sp)


velocity
```{r}
gVoccfile <- brick("D:/Climate_Velocity/temp_Vocc/Dist_VoCC_TR/tas_y_dist_CNRM_4.5.nc", varname="tas_y_dist")
gVoccfile[1:3]

names(gVoccfile)<-1951:2100
as.Date("1951-01-01")
CNRM <- sumSeries(gVoccfile, p = "2000/2100", yr0 = "2000-01-01",nlayers(gVoccfile),fun = function(x) colMeans(x, na.rm = TRUE),freqin = "years", freqout = "years") 


# temporal trend
vt <- tempTrend(gVoccfile, th =20)
plot(vt)


# spatial gradient
vg <- spatGrad(gVoccfile, th = 0.0001, projected = FALSE)
plot(vg)

# climate velocity
v <- gVoCC(vt, vg)

move on

vel <- v[[1]]

# Calculating area internally
MPbuffer<- readOGR( "D:/Climate_Velocity/temp_Vocc/Dist_VoCC_TR/mp/Buffer_MP.shp")
class(MPbuffer)
a1 <- resTime(MPbuffer, vel, areapg = NA)
a1
 # Using the area field from the polygon data table
a2 <- resTime(MPbuffer, vel, areapg = as.numeric(as.numeric(levels(MPbuffer$Area_km2))[MPbuffer$Area_km2]))
a2
# Using a user defined polygon
x_coord <- c(-28, -20, -20.3, -25.5)
y_coord <- c(60, 61, 63, 62)
p <- Polygon(cbind(x_coord, y_coord))
sps <- SpatialPolygons(list(Polygons(list(p),1)))
a3 <- resTime(sps, vel, areapg = NA)

plot(vel)
plot(MPbuffer, add = TRUE)
plot(sps, add = TRUE)!

Could you please help me where is my problem 
[Rplot01|473x364](upload://597YcKB4sTFIVdpH0WGf8suYPE7.png)