pxweb_query: Create a PXWEB query

View source: R/pxweb_query.R

pxweb_queryR Documentation

Create a PXWEB query

Description

Creates a pxweb query object from either a list with named values, a json query file or json query string. See examples below.

Usage

pxweb_query(x)

## S3 method for class 'character'
pxweb_query(x)

## S3 method for class 'json'
pxweb_query(x)

## S3 method for class 'pxweb_query'
pxweb_query(x)

## S3 method for class 'list'
pxweb_query(x)

## S3 method for class 'response'
pxweb_query(x)

## S3 method for class 'pxweb_explorer'
pxweb_query(x)

Arguments

x

an object to cast as a pxweb_query object.

See Also

pxweb_query_as_json, pxweb_query_as_rcode

Examples

dims <- list(Alue = c("*"),
             "Asuntokunnan koko" = c("*"),
             Talotyyppi = c("S"),
             Vuosi = c("*"))
pxq1 <- pxweb_query(dims)

json_query <- file.path(system.file(package = "pxweb"), 
                        "extdata", "examples", "json_query_example.json")
pxq2 <- pxweb_query(json_query)



pxweb documentation built on Oct. 31, 2022, 5:07 p.m.