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

Commit

Permalink
update pricing details (closes #87)
Browse files Browse the repository at this point in the history
  • Loading branch information
leeper committed Jun 30, 2015
1 parent 9bab1a7 commit f48b1a9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: MTurkR
Version: 0.6.5.2
Date: 2015-06-07
Version: 0.6.5.3
Date: 2015-06-30
Title: R Client for the MTurk Requester API
Authors@R: c(person("Thomas J.", "Leeper", role = c("aut", "cre"),
email = "thosjleeper@gmail.com"),
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## SIGNIFICANT USER-VISIBILE CHANGES ##

* `SufficientFunds` reflects the new commission structure effective July 21, 2015. (#87)
* `BulkCreateFromTemplate` and `BulkCreateFromURLs` now have a `frame.height` argument with a default of 450.

# CHANGES TO MTurkR 0.6.5 #
Expand Down
9 changes: 6 additions & 3 deletions R/SufficientFunds.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SufficientFunds <-
function (amount = NULL, assignments = NULL, hits = NULL, bonus.ct = NULL,
bonus.amount = NULL, masters = FALSE, turkfee = 0.1, turkmin = 0.005,
mastersfee = 0.2, ...)
bonus.amount = NULL, masters = FALSE, turkfee = 0.2, turkmin = 0.01,
mastersfee = 0.05, ...)
{
total <- 0
payments <- 0
Expand All @@ -10,8 +10,11 @@ function (amount = NULL, assignments = NULL, hits = NULL, bonus.ct = NULL,
bonuses <- 0
bonus.fee <- 0
amount <- as.numeric(amount)
if (!is.null(assignments))
if (!is.null(assignments)) {
assignments <- as.numeric(assignments)
if(assignments >= 10)
turkfee <- .40
}
if (!is.null(hits))
hits <- as.numeric(hits)
if (!is.null(bonus.ct))
Expand Down
10 changes: 6 additions & 4 deletions man/AccountBalance.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AccountBalance(verbose = getOption('MTurkR.verbose', TRUE), ...)

SufficientFunds(amount = NULL, assignments = NULL, hits = NULL,
bonus.ct = NULL, bonus.amount = NULL, masters = FALSE,
turkfee = 0.1, turkmin = 0.005, mastersfee = 0.2, ...)
turkfee = 0.2, turkmin = 0.01, mastersfee = 0.05, ...)
}
\arguments{
\item{amount}{Intended per-assignment payment amount.}
Expand All @@ -19,9 +19,9 @@ SufficientFunds(amount = NULL, assignments = NULL, hits = NULL,
\item{bonus.ct}{Number of intended bonuses.}
\item{bonus.amount}{Amount of each bonus.}
\item{masters}{A logical indicating whether MTurk Masters will be used. Default is \code{FALSE}.}
\item{turkfee}{Amazon's fee as percentage of payments. Default is 10-percent (as 0.10).}
\item{turkmin}{Amazon's minimum per-assignment fee. Default is $0.005.}
\item{mastersfee}{Amazon's additional charge for use of MTurk Masters. Default is 20-percent (as 0.20).}
\item{turkfee}{Amazon's fee as percentage of payments. Default is 20-percent (as 0.20). Note, however, that MTurk charges an additional 20-percent if the number of \code{assignments} is greater than or equal to 10. This is factored in automatically}
\item{turkmin}{Amazon's minimum per-assignment fee. Default is $0.01.}
\item{mastersfee}{Amazon's additional charge for use of MTurk Masters. Default is 5-percent (as 0.05).}
\item{verbose}{Optionally print the results of the API request to the standard output. Default is taken from \code{getOption('MTurkR.verbose', TRUE)}.}
\item{...}{Additional arguments passed to \code{\link{request}}.}
}
Expand All @@ -33,6 +33,8 @@ SufficientFunds(amount = NULL, assignments = NULL, hits = NULL,
\value{Return value is an object of class \dQuote{MTurkResponse}, including an additional character string (\code{balance}) containing the balance of the account in US Dollars. Note: object is returned invisibly.}
\references{
\href{http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_GetAccountBalanceOperation.html}{API Reference}
\href{https://requester.mturk.com/pricing}{MTurk Pricing Structure}
}
\author{Thomas J. Leeper}
%\note{}
Expand Down
4 changes: 2 additions & 2 deletions man/MTurkR-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
\docType{package}
\title{R Client for the MTurk Requester API}
\description{
This package provides access to the Amazon Mechanical Turk (MTurk) API via R, including all the basic API calls, plus additional wrappers to simplify multiple sequential calls and transform the XML returned by the API requests into R data structures (especially, dataframes). The package provides users of the MTurk Requester User Interface (RUI) with access to a variety of functions currently unavailable to them (the creation and maintenance of worker Qualifications, email notifications to workers through \code{\link{ContactWorker}}, and streamlined bonus payments through \code{\link{GrantBonus}}). It also provides users with all functions available in the RUI directly in R as well as a large number of other functions, with a relatively simple command-line interface.
This package provides access to the Amazon Mechanical Turk (MTurk) Requester API. The package provides users of the MTurk Requester User Interface (RUI) with access to a variety of functions currently unavailable to them (the creation and maintenance of worker Qualifications, email notifications to workers through \code{\link{ContactWorker}}, and streamlined bonus payments through \code{\link{GrantBonus}}). It also provides users with all functions available in the RUI directly in R as well as a large number of other functions, with a relatively simple command-line interface.

The core functionality is enacted through \code{\link{request}}, though most users are unlikely to use this function directly. Instead, most users will find themselves using four principal functions: \code{\link{credentials}}, \code{\link{CreateHIT}}, \code{\link{GetAssignments}}, and \code{\link{ApproveAssignments}}, to define one's MTurk (AWS) credentials, to create one or more HITs on the MTurk server, to retrieve completed assignments, and to approve assignments (and thus pay workers), respectively. Critically important, nothing in MTurkR will work during a given session without either first setting AWS credentials with the \code{\link{credentials}} function or specifying those credentials atomically within each function.
Most users will find themselves using four principal functions: \code{\link{credentials}}, \code{\link{CreateHIT}}, \code{\link{GetAssignments}}, and \code{\link{ApproveAssignments}}, to define one's MTurk (AWS) credentials, to create one or more HITs on the MTurk server, to retrieve completed assignments, and to approve assignments (and thus pay workers), respectively. Critically important, nothing in MTurkR will work during a given session without either first setting AWS credentials with the \code{\link{credentials}} function or specifying those credentials atomically within each function. API keys can also be loade as environment variables or via \code{options()}.
There are five common parameters that can be specified in most MTurkR functions: \code{keypair}, \code{verbose}, \code{log.requests}, and \code{sandbox}. The first of these is the AWS credentials parameter just described (whose default can be set globally with \code{\link{credentials}}), and the latter four are logicals. \code{verbose} causes certain information to be displayed on the standard output when functions are executed. \code{log.requests} records details of API calls in the working directory (see \code{\link{readlogfile}}). Setting the parameter \code{sandbox=TRUE} executes requests in the developer sandbox rather than the live server. This can be set globally with \code{options('MTurkR.sandbox')}, where the default is \code{FALSE}.
Expand Down

0 comments on commit f48b1a9

Please sign in to comment.