statscnQueryData: query data in the statscn db

Description Usage Arguments Value Examples

View source: R/rstatscn.R

Description

the main function for querying the statscn database, it will retrieve the data from specified db and orginize the data in a data frame.

Usage

1
2
statscnQueryData(zb = "A0201", dbcode = "hgnd", rowcode = "zb",
  colcode = "sj", moreWd = list(name = NA, value = NA))

Arguments

zb

the zb/category code to be queried

dbcode

the db code for querying

rowcode

rowcode in the returned data frame

colcode

colcode in the returned data frame

moreWd

more constraint on the data where the name should be one of c("reg","sj") , which stand for region and sj/time. the valuecode for reg should be the region code queried by statscnRegions() the valuecode for sj should be like '2014' for *nd , '2014C' for *jd , '201405' for *yd. Be noted that , the moreWd name should be different with either rowcode or colcode

Value

the data frame you are quering

Examples

1
2
3
df=statscnQueryData('A0201',dbcode='hgnd')
df=statscnQueryData('A0201',dbcode='fsnd',rowcode='zb',colcode='sj',
                    moreWd=list(name='reg',value='110000'))

jiang-hang/rstatscn documentation built on May 17, 2017, 8:27 p.m.