I am facing issue as below where I am unable to use the string with quotes as a function argument value, here is program where i am creating a simple function to subset the data based on the string subset condition as below. I am using the rlang package curly curls {{ but this seems not working any thoughts
adsl <- data.frame(SubjList=c(1:10), SAFFL=sample(c('Y','N'),10,replace = T))
subs <- function(data=NA,subset='SubjList!=""'){
data1 <- data %>% filter({{subset}})
return(data1)
}
subs(data=adsl,subset = "SAFFL=='Y'")