zz_format: Accepted formats from Zamzar

Description Usage Arguments Details Value Examples

View source: R/zz_format.R

Description

Get dataframe of all the formats accepted by Zamzar. Alternatively, a dataframe of formats you can convert an origin to.

Usage

1
zz_format(origin = NULL, usr = NULL)

Arguments

origin

The origin format you want to convert from. If a valid argument is passed to origin, zz_format() returns a dataframe of:

  • targets: The formats your origin can be converted to.

  • costs: The cost for converting between your origin and a given target.

See also: https://developers.zamzar.com/formats

If no argument has been passed to orign, a dataframe containing all the accepted formats by the Zamzar API is returned.

See: https://developers.zamzar.com/formats

usr

The username/API key you are using. If not set, the function will check if a key exists as a ZAMZAR_USR variable in .Renviron and use that.

See: https://developers.zamzar.com/user

Details

Please note that a Zamzar key passed as argument to usr takes precedence over a Zamzar key extracted from an .Renviron.

Value

Either a dataframe of formats that you can convert to, or a dataframe of accepted origin formats.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# Returns a single column dataframe of all the accepted formats
# for the origin param.
zz_format(usr = "key")

# Same as above (assuming a valid key in .Renviron).
zz_format()

# Returns an error since the origin argument isn't recognized by the Zamzar API.
zz_format(origin = "invalid_origin")

# Returns a dataframe of targets that origin can be converted to,
# and of the cost of converting to a given target.
zz_format(origin = "emf")

## End(Not run)

zzlite documentation built on March 26, 2020, 7:36 p.m.