user_import | R Documentation |
Used to generate a csv file that can be used to upload new user accounts to REDCap directly (via control centre). This requires a dataframe of at least 4 mandatory columns (corresponding to: username, first name, last name, and email address) and 4 optional columns (corresponding to: institution, sponser, expiration, comments). All optional columns will be blank unless otherwise specified.
user_import(
df,
username,
first_name,
last_name,
email,
institution = NULL,
sponser = NULL,
expiration = NULL,
comments = NULL,
path = NULL
)
df |
Dataframe of at least 4 mandatory columns (corresponding to: username, first name, last name, and email address) and 4 optional columns (corresponding to: institution, sponser, expiration, comments). |
username |
Column name (Mandatory) which corresponds to "Username". |
first_name |
Column name (Mandatory) which corresponds to "First name". |
last_name |
Column name (Mandatory) which corresponds to "Last name". |
email |
Column name (Mandatory) which corresponds to "Email address". |
institution |
Column name (Optional/Recommended) which corresponds to "Institution ID". Can be used to record the data_access_group / centre of the user. |
sponser |
Column name (Optional) which corresponds to "Sponsor username". |
expiration |
Column name (Optional) which corresponds to "Expiration". Must be in YYYY-MM-DD HH:MM or MM/DD/YYYY HH:MM format. |
comments |
Column name (Optional) which corresponds to "Comments". |
path |
Path or connection to write to as .csv file. |
Returns a dataframe formated for REDCap user import (and an optional CSV file specified using path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.