brodieG / vetr

Trust, but Verify
78 stars 2 forks source link

Illegal access of SYMSXP as CHAR #100

Closed brodieG closed 3 years ago

brodieG commented 4 years ago

Something bad happening

interp_along <- function(points, targets) {
  vetr::vetr(
    matrix(numeric(),nrow=3) && ncol(.) > 1,
    numeric() && vetr::all_bw(., 0, 1)
  )
}
interp_along(matrix(0,3,10), c(0, .002, .004, .006, .5, 1))
## Error in vetr::vetr(matrix(numeric(), nrow = 3) && ncol(.) > 1, numeric() &&  : 
##  CHAR() can only be applied to a 'CHARSXP', not a 'symbol'

Doesn't happen if we use all_bw instead of vetr::all_bw.