Learn R Programming

MTurkR (version 0.8.0)

seconds: Convert arbitrary times to seconds

Description

A convenience function to convert arbitrary numbers of days, hours, minutes, and/or seconds into seconds.

Usage

seconds(days = NULL, hours = NULL, minutes = NULL, seconds = NULL)

Arguments

days

An optional number of days.

hours

An optional number of hours.

minutes

An optional number of minutes.

seconds

An optional number of seconds.

Value

An integer equal to the requested amount of time in seconds.

Details

A convenience function to convert arbitrary numbers of days, hours, minutes, and/or seconds into seconds. For example, to be used in setting a HIT expiration time. MTurk only accepts times (e.g., for HIT expirations, or the duration of assignments) in seconds. This function returns an integer value equal to the number of seconds of the input, and can be used atomically within other MTurkR calls (e.g., CreateHIT).

Examples

Run this code
# NOT RUN {
seconds(hours=5, seconds=15)
seconds(days=1)
# }

Run the code above in your browser using DataLab