as.location: Convert a path or URL to a location object

Description Usage Arguments Examples

View source: R/as.location.R

Description

Convert a path or URL to a location object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
as.location(x, ...)

## S3 method for class 'character'
as.location(x, ...)

## S3 method for class 'location'
as.location(x, ...)

## S3 method for class 'location'
print(x, ...)

Arguments

x

Input, a path or URL

...

Ignored.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# A zip file
file <- system.file("examples/0000154-150116162929234.zip",
  package = "finch")
as.location(file)

# A directory
dir <- system.file("examples/0000154-150116162929234",
  package = "finch")
as.location(dir)

# A URL
as.location("https://httpbin.org/get")

finch documentation built on Aug. 11, 2020, 9:06 a.m.