Learn R Programming

fulltext (version 2.0)

as_ftdmurl: Coerce a url to a tdmurl with a specific type

Description

A tmd url is just a URL with some attributes to make it easier to handle within other functions in this package.

Usage

as_ftdmurl(url, type, doi = NULL, member = NULL, intended_application = NULL)

# S3 method for ftdmurl as_ftdmurl(url, type, doi = NULL, member = NULL, intended_application = NULL)

# S3 method for character as_ftdmurl(url, type, doi = NULL, member = NULL, intended_application = NULL)

Arguments

url

(character) A URL.

type

(character) One of 'xml' (default), 'html', 'plain', 'pdf', 'unspecified', or 'all'

doi

(character) A DOI, optional, default: NULL

member

(character) Crossref member id. optional

intended_application

(character) intended application string, optional

Examples

Run this code
# NOT RUN {
as_ftdmurl("http://downloads.hindawi.com/journals/bmri/2014/201717.xml",
   "xml")
as_ftdmurl("http://downloads.hindawi.com/journals/bmri/2014/201717.pdf",
   "pdf")
out <-
 as_ftdmurl("http://downloads.hindawi.com/journals/bmri/2014/201717.pdf",
   "pdf", "10.1155/2014/201717")
attributes(out)
identical(attr(out, "type"), "pdf")
# }

Run the code above in your browser using DataLab