I'm using R version 3.3 and I'm using the str_split() function from stringr package, but I'm unable to execute it as the compiler is throwing error here's my code:
  y <- str_split(x, "'")
  ret <- map_dbl(y, function(z){
    ifelse(length(z)>1,
           as.numeric(z[1])*12 + as.numeric(z[2]),
          as.numeric(z[1]))
  })
return(ret)
}```
What is the problem in my code?