retrieveProjects {magmaR} | R Documentation |
Helper function that retrieves all the projectName options which a user has access to, from janus.
Description
Helper function that retrieves all the projectName options which a user has access to, from janus.
Usage
retrieveProjects(target, all_cols = FALSE, verbose = FALSE)
Arguments
target |
A list, which can be created using |
all_cols |
Logical. Sets whether to report back the entire table instead of the default behavior where the column 'cc_text' is removed for brevity. |
verbose |
Logical. Sets whether to report the status of the '/api/user/projects' curl request sent to janus. |
Details
This function takes in the user's target
containing their authorization token, and a url targeting either magma or janus.
It then converts the given url to target janus, and makes a curl request to <janus-url>/api/user/projects in order to return which projects a user can access.
Value
A data.frame where elements of the 'project_name' column reflect what can be given to projectName
inputs of other magmaR functions.
Examples
if (interactive()) {
retrieveProjects(target = magmaRset())
}