switchDag: Switch Data Access Group Assignment for the Current User

View source: R/switchDag.R

switchDagR Documentation

Switch Data Access Group Assignment for the Current User

Description

This method enables the current API user to switch (assign/reassign/unassign) their current Data Access Group assignment if they have been assigned to multiple DAGs via the DAG Switcher page in the project.

Usage

switchDag(rcon, dag, ...)

## S3 method for class 'redcapApiConnection'
switchDag(rcon, dag, ...)

Arguments

rcon

A redcapConnection object.

dag

character(1) A unique data access group to which to assign the current user. Use NA to leave the user unassigned.

...

Arguments to pass to other methods

Value

Invisibly returns TRUE when the call is completed successfully. Otherwise an error is thrown.

See Also

exportDags(),
importDags(),
deleteDags(),
exportUserDagAssignments(),
importUserDagAssignments()

Examples

## Not run: 
unlockREDCap(connections = c(rcon = "project_alias"), 
             url = "your_redcap_url", 
             keyring = "API_KEYs", 
             envir = globalenv())

# Switch the current user to the DAG "Facility Two"
switchDag(rcon, 
          dag = "facility_two")

## End(Not run)

nutterb/redcapAPI documentation built on Aug. 31, 2024, 4:37 a.m.