Learn R Programming

Mica R

R package for accessing Mica2 web services:

  • search any type of documents (variable, dataset, study, population, dce (datacollection event), network)
  • search taxonomy vocabularies and terms
  • get data access requests form configuration and listing for reporting

Installation

Requires R 3.x.

# Install dependencies
if (!require("httr")) {
  install.package(c("httr"), dependencies=TRUE)
}
# Install from source code repository
devtools::install_github("obiba/micar")

Usage

Steps:

  • open connection to Mica server
  • extract and process documents
  • close connection with Mica server

Examples:

Copy Link

Version

Install

install.packages('micar')

Monthly Downloads

149

Version

1.1.2

License

GPL-3

Maintainer

Yannick Marcon

Last Published

April 16th, 2021

Functions in micar (1.1.2)

.flatten

Flatten a list hierarchy
.get

Issues a GET request to mica for the specified resource
mica.dar.amendment

Get a amendment
mica.dar.actions

Get data access request actions
.verbose

Verbose flag
mica.dar

Get a data access request
mica.studies

Get the studies
mica.networks

Get the networks
mica.dars

Get the data access requests
mica.datasets

Get the datasets
rqlNode

New RQL node
mica.vocabularies

Get the vocabularies
mica.dar.form

Get the data access request form
.handleResponse

Default request response handler.
mica.dar.history

Get data access request history
.darStatusDTOToDF

Make a list of StatusChange DTOs a data frame (applies to DARs and their amendments)
.post

Issues a POST form request to mica for the specified resource
mica.study.dces

Get the study data collection events
mica.dar.amendments

Get amendments
mica.dar.amendments.history

Get amendments history
.extractLabel

Extract label for locale. If not found, fallback to undefined language label (if any).
mica.taxonomies

Get the taxonomies
.url

Utility method to build urls. Concatenates all arguments and adds a '/' separator between each element
.reportListMetrics

Display search result metrics
mica.study.populations

Get the study populations
mica.logout

Close connection with Mica
mica.variables

Get the variables
mica.dar.amendment.history

Get amendment history
mica.login

Open connection with Mica
mica.dar.amendment.form

Get the data access request amendment form
.as.rql

Utility method to build RQL atomic statement.
.extractLabel2

Extract label for locale. If not found, fallback to undefined language label (if any).
.darDTOToDF

Make a list of DataAccessRequest DTOs a data frame (applies to DARs and their amendments)
.authToken

Constructs the value for the Authorization header
.append.rql

Insert some RQL statements to perform the query. TODO parse RQL properly!
.extractMicaSessionId

Extract micasid from cookie data frame.