Creating function(data, x) with mutate(x = x*2) in it, does not work

前端 未结 0 1957
南笙
南笙 2020-12-04 02:41
library(dplyr)

func <- function(data, col){
  data <- data %>%
    mutate(col = {{col}}*2)
  return(data)
}

df <- data.frame(x = c(1:8), y = c("he         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题