Learn R Programming

shiny.reglog (version 0.5.2)

create_gsheet_db: Create new 'googlesheet' reglog database

Description

[Deprecated]

Used to match deprecated 'login_server' function. Use gsheet_tables_create() to create 'googlesheet'-based database for new 'RegLogServer' object.

Usage

create_gsheet_db(name = NULL, credentials = NULL, credentials_pass_hashed)

Value

id of the 'googlesheet' file. After creation you need to provide it to login_server().

Arguments

name

specify name for 'googlesheet' file. Defaults to random name.

credentials

you can pass credentials data to create already populated tables. Provide data.frame object containing variables: timestamp, user_id, user_mail and user_pass. If there are multiple records with the same user_id, the most recent will be kept only.

credentials_pass_hashed

mandatory when putting some credentials data. Are the passwords already hashed with 'scrypt' package? Takes TRUE (if hashed) or FALSE (if not hashed and need hashing)

Examples

Run this code
if(googlesheets4::gs4_has_token()){

gsheet.id <- create_gsheet_db()

database <- gsheet_get_db(gsheet.id)

# you can then pass 'gsheet.id' to you 'login_server' call
#
# login_server(db_method = "gsheet",
#              gsheet_file = gsheet.id,
#              ...)
#

print(database)

googledrive::drive_trash(gsheet.id)

}

Run the code above in your browser using DataLab