If you want to prompt the user, you can use the [readline][1]
method:
connection <- readline("Connection: ")
uid <- readline("User id: ")
cat("Password: ")
system("stty -echo")
password <- readline()
system("stty echo")
Note the little trick to avoid echoing the password to the screen.
Another option is to store those values in a configuration file (e.g. config.local
) and insert load(config.local)
in the script. Make sure that file is not versioned with svn propset svn:ignore "config.local . "
. Alternatively, you can store that file in a directory which is not under the control of svn.