Skip to content
natalia-araujo edited this page Jun 3, 2024 · 7 revisions

Welcome to the faas4i wiki!

This package was designed to allow users to send requests for modeling and updates using FaaS via API.

Installation

If you are a Linux user make sure the following libs are installed:

  1. ‘libcurl4-openssl-dev’
  2. ‘libxml2-dev’

If you are a Windows user make sure you have Rtools installed in your machine, if not, follow the instructions here to download and install it.

Before you start this installation, make sure you have the package remotes installed in your machine

install.packages("remotes")

We currently require that you have the version 5.2.1 of the package curl installed in your machine to use faas4i. If you are using a different version, you will need to remove the other version and then install 5.2.1:

remove.packages("curl")
remotes::install_version("curl", version = "5.2.1", repos = "http://cran.r-project.org")

Then you can install faas4i:

remotes::install_github("4intelligence/faas4i", force = TRUE, upgrade = FALSE)

Don't forget to load the library and you are all set to start using the package!

library("faas4i")

Authentication

Each user will need to setup the authentication using the function login. The function login will display a URI where 4CastHub's user email and password will be required, as well as the two-factor-authentication code.

faas4i::login()
## Once the url is printed, copy and paste it to your browser and follow with authentication

By default, the login function will wait 90 seconds for authentication. If you wish to adjust the wait time, it is possible to change the parameter using a numeric value for sleep_time.

Accessing projects

You can list all projects associated with your user_email with the function list_projects, and with the ID of the project of interest, you can use the function download_zip to download the project.

Obs.: If you wish to clone this wiki through SSH key, use git clone git@github.com:4intelligence/faas4i.wiki.git in your terminal.

Clone this wiki locally