Skip to content

1️⃣ Analysis with R ​

You can use R to perform analysis with Aplos NCA using API calls via secure http requests. Aplos has prepared example R-scripts to illustrate how this analysis can be performed using R. One script includes functions for specific API requests and the second script includes code to execute a sample analysis and download the results. You can use the links below to see each file and the download it to your computer from the GitHub repository using the download link.

DescriptionFileLink to file
API Functionsfunctions-api.RπŸ“„
Sample analysissample-analysis.RπŸ“„
Security filesecurity.txtπŸ“„
Sample data filesingle_ev.csvπŸ“„
Configuration fileconfiguration_single_ev.jsonπŸ“„
Meta data filemeta_data.jsonπŸ“„
Complete repositoryall filesπŸ”—

Functions ​

There is a single function that performs all actions needed to execute an analysis with Aplos NCA. A detailed description of the actions and the code are available on a separate page. A short description can be found below:

FunctionDescription
get_jwtRequest authentication JSON Web Token (jwt) from Amazon Cognito. This token is required for all API calls.
aplos_ncaRequest Aplos NCA for secure URL to upload input data file.
Securely upload input data file to user account.
Initiate analysis.
Request status of ongoing or completed analysis.
Download and unzip the results to the local computer.

Sample analysis script ​

An example R script is provided that performs a complete analysis using Aplos NCA. The details of the example R script are available on a separate page. The R script performs the following actions:

  1. Import security login information from a file
  2. Request security token from Amazon Cognito
  3. Execute analysis using Aplos NCA