ddi_var {rddi} | R Documentation |
var and its child nodes
Description
This element describes all of the features of a single variable in a social science data file. The following elements are repeatable to support multi-language content: anlysUnit, embargo, imputation, respUnit, security, TotlResp. More information on these elements, especially their allowed attributes, can be found in the references.
Usage
ddi_var(varname, ...)
ddi_catLevel(...)
ddi_codInstr(...)
ddi_geomap(...)
ddi_stdCatgry(...)
ddi_sumStat(...)
ddi_TotlResp(...)
ddi_undocCod(...)
ddi_varFormat(...)
Arguments
varname |
The variable name. |
... |
Child nodes or attributes. |
Details
Parent nodes
var
is contained in dataDscr
.
var specific child nodes
-
ddi_catLevel()
is used to describe the levels of the category hierarchy. -
ddi_codInstr()
are coder instructions. These are any special instructions to those who converted information from one form to another for a particular variable. This might include the reordering of numeric information into another form or the conversion of textual information into numeric information. -
ddi_geomap()
is a geographic map. This element is used to point, using a "URI" attribute, to an external map that displays the geography in question. -
ddi_stdCatgry()
are standard category codes used in the variable, like industry codes, employment codes, or social class codes. -
ddi_sumStat()
is one or more statistical measures that describe the responses to a particular variable and may include one or more standard summaries, e.g., minimum and maximum values, median, mode, etc. -
ddi_TotlResp()
are the number of responses to this variable. This element might be used if the number of responses does not match added case counts. It may also be used to sum the frequencies for variable categories. -
ddi_undocCod()
is the list of undocumented codes where the meaning of the values are unknown. -
ddi_varFormat()
is the technical format of the variable in question.
Value
A ddi_node object.
Shared and complex child nodes
References
Examples
ddi_var(varname = "var01")
# Functions that need to be wrapped in ddi_var()
ddi_catLevel(ID = "Level1", levelnm = "Broader sectors")
ddi_codInstr("Use the standard classification tables to present responses to
the question: What is your occupation? into numeric codes.")
ddi_geomap(URI = "https://mapURL.com")
ddi_stdCatgry(date = "1981",
"U. S. Census of Population and Housing, Classified Index of
Industries and Occupations")
ddi_sumStat(type = "min", "0")
ddi_TotlResp("1,056")
ddi_undocCod("Responses for categories 9 and 10 are unavailable.")
ddi_varFormat(type = "numeric",
formatname = "date.iso8601",
schema = "XML-Data",
category = "date",
URI = "http://www.w3.org/TR/1998/NOTE-XML-data/",
"19541022")