So I am passing in an argument to my R script. I then use the argument as part of my logic to name the SQL result table that I'm later going to fill and create with data. I first do the below and fill DestinationTable with the name of the table that I want.
DestinationTable <- paste("xx.TableName",args[4],sep = "")
After I do this I run a print(DestinationTable) and everything looks ok. Then when I do a sqlSave like the below it literally uses "DestinationTable" as the table name rather than the string I put into DestinationTable (such as "xx.TableNameArg4")
sqlSave(ch, data.frame(DestinationTable), rownames = FALSE)
How can I get the value stored in DestinationTable and use that rather than it using the literal word "DestinationTable"?
Thanks for any help!