View source: R/utils-usa-get-passwords.R
usa_get_passwords | 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.
usa_get_passwords(password_file)
password_file |
A file path specifying where to find the passwords. The path can be full or relative to your current working directory. The text file must contain two lines, where the first line is the NORPAC password and the second line is the PacFIN password. These passwords should not be surrounded with quotes. If a file name is not provided, which is the default behavior, then the user will be prompted for their passwords. This also happens if the file cannot be found given the path provided. These passwords are needed because the databases store confidential information. |
A list with two entries, usernames
and passwords
. Each entry contain a
named vector with one element for each database that is used, i.e., NORPAC
and PacFIN. 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 <- usa_get_passwords()
# Prompted for passwords for each database because password_file is not found
test <- usa_get_passwords(password_file = "doesnotwork.txt")
# On Kelli Johnson's machine, the following will work
test <- usa_get_passwords(password_file = "password.txt")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.