hakedata_sql_password | R Documentation |
Find the username and passwords specific given the username of the computer and stored or entered passwords for accessing databases that store confidential information about landings of Pacific Hake.
hakedata_sql_password(database = c("NORPAC", "PacFIN"), file)
database |
A vector of character values specifying which databases you want login information for. |
file |
A file path specifying where to find the passwords.
The path can be full or relative to your current working directory.
If a path is provided, the file that it leads to
must be for a text file with one password per line for each database
in the |
A list with two entries, usernames
and passwords
.
Each element will have the same number of entries as the
input argument database
and be named using the elements of database
.
The list is invisibly returned to ensure that the passwords are not printed
to the screen. Thus, the function call should be assigned to an object.
Kelli F. Johnson
## Not run:
# Prompted for passwords for each database
test <- hakedata_sql_password()
# Prompted for passwords for each database because file is not found
test <- hakedata_sql_password(file = "doesnotwork.txt")
# On Kelli Johnson's machine, the following will work
test <- hakedata_sql_password(file = "password.txt")
# Doesn't work because entry for database is not in the list
# of allowed databases, i.e., the default for `database`.
test <- hakedata_sql_password(database = "onedatabase")
# Only look for one password
test <- hakedata_sql_password(database = "NORPAC")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.