Learn R Programming

algorithmia-r

R client library for accessing the Algorithmia API

Calling algorithms

First make a client object:

client <- getAlgorithmiaClient("ALGORITHMIA_API_KEY")

Then get the algorithm object:

algorithm <- client$algo("algo://AUTHOR/ALGORITHM_NAME/VERSION")

Call pipe passing in the input to the algorithm:

response <- algorithm$pipe(input)

There are two fields in the result. The meta data (which has timing data) and the result.

result <- response$result

Deployment

New feature release without breaking API changes

  • Verify that the Version field in the DESCRIPTION file has had its minor release version (y in x.y.z incremented from the previously released version, and that the patch version (z in x.y.z) is set to 0.
  • Ensure that CI build passes successfully
  • Run the steps in the test:check_as_cran CI stage inside a Docker container with the image for that stage
  • Verify that the submission follows all CRAN policies.
  • Submit the new package https://xmpalantir.wu.ac.at/cransubmit/
    • Name: Robert Fulton
    • Email: rfulton@algorithmia.com
    • Package: <the tar.gz file that was created from the build>
    • Optional comment:

Copy Link

Version

Install

install.packages('algorithmia')

Monthly Downloads

235

Version

0.3.0

License

MIT + file LICENSE

Maintainer

Robert Fulton

Last Published

October 12th, 2020

Functions in algorithmia (0.3.0)

getAlgorithmiaClient

Creates a new Algorithmia Client which you can use to call algorithms and interact with directories and files in the Algorithmia data API.
ReadAcl.PRIVATE

The ACL that allows only you to read an item. Sample usage: dataDirectory$create(ReadAcl.PRIVATE) dataDirectory$updatePermissions(ReadAcl.PRIVATE)
AlgorithmiaAlgorithm-class

Algorithm object which enables you to call Algorithmia algorithms. To create one, call: `client$algo("algoUrl")`
AlgorithmiaAcl-class

Internal class used to describe ACLs.
ReadAcl.MY_ALGORITHMS

The ACL that allows your algorithms to read an item. Sample usage: dataDirectory$create(ReadAcl.MY_ALGORITHMS) dataDirectory$updatePermissions(ReadAcl.MY_ALGORITHMS)
AlgorithmiaClient-class

Client object which makes it easy to interact with the Algorithmia REST API. To create one, call `getAlgorithmiaClient("YOUR_ALGORITHMIA_API_KEY")`
AlgorithmiaDataDirectory-class

DataDirectory object to interact with directories. Supports Algorithmia data directories, S3, Dropbox and more coming soon! To create one, call: `client$dir("directory_path")`
getAlgorithmHandler

Creates a new Algorithm Handler which registers the onLoad method (which loads the model or other dependencies for the algorithm) and the apply method which takes in the result of the onLoad method and the input from the user.
ReadAcl.PUBLIC

The ACL that allows anyone to read an item. Sample usage: dataDirectory$create(ReadAcl.PUBLIC) dataDirectory$updatePermissions(ReadAcl.PUBLIC)
AlgorithmiaDirectoryIterator-class

DirectoryIterator object to iterate over child files or directories of a parent directory. To create one, call: `dataDirectory$dirs()` or `dataDirectory$files()`
AlgorithmiaDataFile-class

DataFile object to interact with files. Supports Algorithmia data files, S3, Dropbox and more coming soon! To create one, call: `client$file("file_path")`