To accomodate the vast majority of KI data scientists, the kitools package is available in both R and Python.

This installation and setup article covers both languages, but in the package usage articles, you can use the R/Python toggle in the navigation bar to change the code examples to the language of your choice.

Sign up for Synapse

Before installing kitools, you should make sure you have a Synapse account. The landing page of Synapse contains straightforward directions for this. Make note of your Synapse email and password.

Install kitools in Python

If you are using Python, you can install the kitools package using pip.

pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple \
  kitools

Note that kitools requires Python >= 3.5.

Install kitools in R

In R, you can install the kitools package directly from Github using the remotes package:

install.packages("remotes") # (if not already installed)
remotes::install_github("ki-tools/kitools-r")

The kitools R package is simply a wrapper around the Python package. This is done to keep the package functionality and stability in sync. We have built the R package in a way that you need not be aware of anything Python-related. Python and the associated packages are installed for you as part of an initial configuration. To configure your environment (this only needs to be done once), run the following:

Store Synapse credentials

One additional step for getting set up to use kitools is to register your Synapse credentials in R or Python so that they can be cached and you don’t need to be prompted for them every time you do an operation that contacts Synapse.

In Python:

In R:

library(kitools)
syn_login(__email__, __password__)

Using the package

Now that you are set up, take a look at “KI Projects and Working With Data”.