Created
June 3, 2016 10:22
-
-
Save aghaynes/a39d36a9fd4cd827567a3c20b14cf9f4 to your computer and use it in GitHub Desktop.
Generate a random password using R
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
passgen <- function(n = 8){ | |
chars <- c(LETTERS, letters, as.character(seq(0,9,1)), "!", "$", ".", "_", "-", "?") | |
paste0(sample(chars, n), collapse = "") | |
} | |
passgen() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment