in an application I use RODBC
to access a database. Specifically I call a function like this: sqlQuery(conn, qry)
, where qry
is a string, and conn
is a RODBC
connection object.
Is it possible to paste this into a file in such a way that if I copy and paste the file contents into the terminal, I will reproduce the exact function call?
For example, if I make a dataframe: df <- data.frame(test = c(1, 2, 3))
, I can call dput(df)
, which will return: structure(list(frank = c(1, 2, 3)), class = "data.frame", row.names = c(NA, -3L))
If I copy and paste that into the terminal, I will get the original dataframe.
It would be really convienient for debugging if I could do something like this for sqlQuery(conn, qry)