myDF <- data.frame(L=LETTERS, l=letters, N=1:13)
myDF <- do.call(rbind, replicate(5, myDF[1:5,], simplify=FALSE))
myDF <- data.frame(sapply(myDF, as.character), stringsAsFactors=FALSE)

theExpression <- 
  substitute(df$var[df$var %in% val] <- newVal, list(df=quote(myDF), var=quote(L), val=quote("A"), newVal=quote("HELLO")))

eval(theExpression)

myDF
