Learn R Programming

rstatscn (version 1.0.2)

statscnQueryData: query data in the statscn db

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

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

Run this code
df=statscnQueryData('A0201',dbcode='hgnd')
df=statscnQueryData('A0201',dbcode='fsnd',rowcode='zb',colcode='sj',
                    moreWd=list(name='reg',value='110000'))

Run the code above in your browser using DataLab