R: Source functions

source_functions {sits} | R Documentation

## Source functions

### Description

These functions provide an API to handle/retrieve data from sources.

`.sources()` lists all sources available in sits.

`.source_check()` checks if a source is available in sits.

`.source_new()` creates an object with a corresponding S3 class defined in a given source.

`.source_service()` returns the service associated with a given source.

`.source_s3class()` returns the s3 class associated with a given source.

`.source_url()` get an URL associated with a source. Not all sources have an URL. In these cases, an `NA` is returned.

### Usage

    .sources(internal = TRUE)

    .source_check(source)

    .source_new(source)

    .source_service(source)

    .source_s3class(source)

    .source_url(source)

### Arguments

`internal` | A `logical` value if internal sources should be listed. Internal sources are: 'PROBS', 'CLASSIFIED', and 'LOCAL'
`source` | A `character` value referring to a valid data source.

### Value

The values returned by each function are described as follows.

`.sources()` returns a `character` vector with all sources names available in sits.

`.source_check()` returns `NULL` if no error occurs.

`.source_new()` returns a `character` vector with the S3 class defined in source's `S3class` attribute.

`.source_service()` returns a `character` value or `NA` if no service is associated with a given source.

`.source_s3class()` returns a `character` vector. sits uses these classes to run source functions.

`.source_url()` returns a `character` value or `NA` if no URL is associated with a given source.

[Package sits version 0.14.1 Index]