Skip to content
This repository was archived by the owner on May 24, 2019. It is now read-only.

Installation

leeper edited this page Jan 3, 2015 · 13 revisions

To use MTurkR, you need to have R installed on your machine. It is available for multiple platforms from CRAN.

Once R is installed and open, the latest stable release of MTurkR can be installed from your local CRAN mirror and loaded using:

install.packages("MTurkR")
library("MTurkR")

The latest development release can be installed from GitHub using devtools:

# install.packages("devtools")
library("devtools")
install_github("leeper/MTurkR")
library("MTurkR")

Once installed, you will need to supply your AWS Access Key ID and Secret Key (your "keypair") via the credentials function, or by storing them in environment variables. Using credentials, you simply do the following:

credentials(keypair=c("AKIAJFYYWO3EEXAMPLE","Bpyq5ZqpQGshEKfcfd8CwUXEXAMPLE/ExAMPle"))

You can also specify the Access Key ID and Secret Key in system environment variables (e.g., by setting them up system-wide, by incorporating them into the R startup procedures, or in a .Renviron file in your working directory. The values should be set as variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, respectively. When MTurkR is loaded, these environment variables will automatically be retrieved (if available) and loaded as your credentials.

Your keypair can be generated on the IAM Management Console under the heading Access Keys. Note that you only have access to your secret key once. After it is generated, you need to save it in a secure location. New keypairs can be generated at any time if yours has been lost, stolen, or forgotten.

Specifying your keypair via credentials, or as environment variables, simplifies subsequent use of MTurkR, but you can always manually specify your keypair in each function call via the keypair argument.

Clone this wiki locally