I try to create a simple function which allow to draw a ggvis plot. I know that I have to use non-standard evaluation here that's why I use intercept function of lazyeval package:
test_fn <- function(data,xvar, yvar){
        plot <- 
                data %>% 
                ggvis(lazyeval::interp(~x, x = as.name(xvar)), 
                      lazyeval::interp(~y, y = as.name(yvar))) %>% 
                layer_points()
        return(plot)
}
EDIT:
This function works fine:
test_fn(mtcars,'mpg', 'qsec')
But what should I do additionally in order to a given command works:
test_fn(mtcars,mpg, qsec)
 
    
