Learn R Programming

EDIutils (version 1.0.3)

login: Login to the EDI repository

Description

Login to the EDI repository

Usage

login(userId = NULL, userPass = NULL, config = NULL)

Value

(character) A temporary (~10 hour) authentication token written to the system variable "EDI_TOKEN".

Arguments

userId

(character) User identifier of an EDI data repository account. If using

userPass

(character) Password of userId

config

(character) Path to config.txt, which contains userId and userPass (see details below)

Details

If userId, userPass, and config are NULL, the console will prompt for credentials.

config: Supplying credentials in a file named config.txt facilitates authentication within automated/unassisted processes. Contents of this file should be new line separated and have the form "<argument> = <value>" (e.g. userId = myname).

See Also

Other Authentication: logout()

Examples

Run this code
if (FALSE) {

# Interactively at the console
login()
#> User name: "my_name"
#> User password: "my_secret"

# Programmatically with function arguments
login(userId = "my_name", userPass = "my_secret")

# Programmatically with a file containing userId and userPass arguments
login(config = paste0(tempdir(), "/config.txt"))
}

Run the code above in your browser using DataLab