Skip to content

Instantly share code, notes, and snippets.

@jandix
Created April 3, 2019 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jandix/7e2682d953cb003703776ba66734d88a to your computer and use it in GitHub Desktop.
Save jandix/7e2682d953cb003703776ba66734d88a to your computer and use it in GitHub Desktop.
Define users
# define a user database
users <- data.frame(id = integer(),
name = character(),
password = character(),
stringsAsFactors = FALSE)
# create test users
users <- rbind(users, data.frame(id = 1,
user = "jane@example.com",
password = bcrypt::hashpw("12345"),
stringsAsFactors = FALSE))
users <- rbind(users, data.frame(id = 2,
user = "bob@example.com",
password = bcrypt::hashpw("98765"),
stringsAsFactors = FALSE))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment