user_import: Generate a csv file to upload new user accounts to REDCap

View source: R/user_import.R

user_importR Documentation

Generate a csv file to upload new user accounts to REDCap

Description

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.

Usage

user_import(
  df,
  username,
  first_name,
  last_name,
  email,
  institution = NULL,
  sponser = NULL,
  expiration = NULL,
  comments = NULL,
  path = NULL
)

Arguments

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.

Value

Returns a dataframe formated for REDCap user import (and an optional CSV file specified using path)


kamclean/collaborator documentation built on Nov. 17, 2023, 3:52 a.m.