Last active
March 5, 2019 17:29
-
-
Save kstseng/03c4d1483dca5fb68bcc638d24ea581b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## R sample code for loading credential | |
## | |
library(configr) | |
config = read.config(file = '~/.config/credential') | |
## section_a | |
username_a = config$section_a$username | |
password_a = config$section_a$password | |
## section_b | |
username_b = config$section_b$username | |
password_b = config$section_b$password | |
print(sprintf('username_a: %s', username_a)) | |
print(sprintf('password_a: %s', password_a)) | |
print(sprintf('username_b: %s', username_b)) | |
print(sprintf('password_b: %s', password_b)) | |
## username_a: abc | |
## password_a: 123 | |
## username_b: def | |
## password_b: 456 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment