select: Select Function

Description Usage Arguments Examples

View source: R/functions.R

Description

This function allows you to use the select function of RDS. RDS typically gives out a limited amount of data to keep the service quick and efficient. This select function will query RDS as many times as needed to compile and return the entire data set to the R user.

Usage

1
2
3
4
5
6
7
select(url, collection, view, autoPage = TRUE, classLimit = NULL,
  classOffset = NULL, codeEquals = NULL, codeLimit = NULL,
  codeOffset = NULL, cols = NULL, colLimit = NULL, colOffset = NULL,
  count = FALSE, distinct = FALSE, facts = FALSE, freqs = FALSE,
  inject = FALSE, key = NULL, limit = NULL, offset = NULL,
  orderby = NULL, sleep = 0.2, stats = FALSE, varProperties = NULL,
  where = NULL)

Arguments

url

The base URL of the RDS server

collection

The collection ID

view

The view ID

autoPage

If set to true multiple queries will be sent to the RDS server in order to compile the complete data set

classLimit

Specifies the limit of classifications that should be returned

classOffset

Specifies the starting index of the classifications to be returned

codeLimit

Specifies the limit of codes that should be returned in each classification

codeOffset

Specifies the starting indexes of the codes in each classification

cols

The columns to select

colLimit

Specifies the limit of classifications that should be returned

colOffset

Specifies the starting index of the classifications to be returned

count

Specifies that the total count of records in the view should be included in the info section

distinct

Specifies that only distinct values should be returned

facts

Specifies that any facts available should be included in the returned metadata

freqs

Specifies that any frequencies available should be included in the returned metadata

inject

Specifies if metadata should be injected into the data frame. If true and there are classifications available the columns codes will be replaced with code values. Defaults to FALSE

key

API key for views that require a key.

limit

Specifies the number of records to return

offset

Specifies the starting index of the records

orderby

Describes how the results should be ordered

sleep

Specifies the time to wait between each query to the server in order to not overwhelm the server. Default is 0.2 seconds.

stats

Specifies that any summary statistics available should be included in the returned

varProperties

Specifies the variable properties to include / exclude from the returned variable metadata. Can be a regex or property names.

where

Describes how to subset the records

Examples

1
2
3
4
5
select("http://localhost:8080/rds/api/catalog/","myCollection","myView",cols="var1,var2") 
select("http://localhost:8080/rds/api/catalog/","myCollection","myView",cols="var1,var2",where="var1<1 AND var2>=3") 
select("http://localhost:8080/rds/api/catalog/","myCollection","myView",cols="var1,var2",orderby="var1 DESC,var2 ASC") 
select("http://localhost:8080/rds/api/catalog/","myCollection","myView",cols="var1,var2",distinct=TRUE,limit=100,offset=100,count=TRUE) 
select("http://localhost:8080/rds/api/catalog/","myCollection","myView",cols="$demographics",inject=TRUE) 

mtna/rrds documentation built on May 23, 2019, 8:19 a.m.