Hi All.
I'm developing some code for an environment that has dplyr 1.0.7 installed (and I can't upgrade that one).
I have a function that gets the variable column.to.use, and inside it has a bit of code that looks like this
get.geneEntrezIDs.dict.from.symbol <-
function(symbol_tbl, column.to.use = 'SYMBOL') {
...
GeneNameToSYMBOLandALIAS <- dplyr::inner_join(requestedSymbol_tbl,
HsSymbolAliasEntrezID,
by = join_by(!!column.to.use == "SYMBOL"))
}
That works great on my computer, which has dplyr 1.3.1. However, join_by is too new. I've tried replacing the code with
GeneNameToSYMBOLandALIAS <- dplyr::inner_join(requestedSymbol_tbl,
HsSymbolAliasEntrezID,
by = c(!!column.to.use, "SYMBOL"))
But the !! seems to confuse dplyr 1.0.7. What's the equivalent to use an external variable in dplyr 1.0.7.
Again, if I could update this environment, I would do so. I have to find some other solution.
Thank you,
Uri David